Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with this code

Status
Not open for further replies.

cit78

Programmer
May 2, 2009
1
AU
Hi all,

I'm very new to assembly language and I'm having trouble working out what the following code is doing. Can anyone explain what is happening?

0052F920 /> 55 PUSH EBP
; <------------ START routine
0052F921 |. 8BEC MOV EBP,ESP
0052F923 |. 83EC 08 SUB ESP,8
0052F926 |. 68 76554000 PUSH <JMP.&MSVBVM60.__vbaExceptHandler> ; SE handler installation
0052F92B |. 64:A1 00000000 MOV EAX,DWORD PTR FS:[0]
0052F931 |. 50 PUSH EAX
0052F932 |. 64:8925 000000>MOV DWORD PTR FS:[0],ESP
0052F939 |. 83EC 3C SUB ESP,3C
0052F93C |. 53 PUSH EBX
0052F93D |. 56 PUSH ESI
0052F93E |. 57 PUSH EDI
0052F93F |. 8965 F8 MOV DWORD PTR SS:[EBP-8],ESP
0052F942 |. C745 FC F84C40>MOV DWORD PTR SS:[EBP-4],Dft8.00404CF8
0052F949 |. 8B55 0C MOV EDX,DWORD PTR SS:[EBP+C] ; //// check number....
0052F94C |. 33C0 XOR EAX,EAX
0052F94E |. 8D4D EC LEA ECX,DWORD PTR SS:[EBP-14]
0052F951 |. 8945 EC MOV DWORD PTR SS:[EBP-14],EAX
0052F954 |. 8945 E8 MOV DWORD PTR SS:[EBP-18],EAX
0052F957 |. FF15 30134000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaStrCo>; MSVBVM60.__vbaStrCopy
0052F95D |. 83EC 10 SUB ESP,10
0052F960 |. 8B45 EC MOV EAX,DWORD PTR SS:[EBP-14]
0052F963 |. 8BFC MOV EDI,ESP
0052F965 |. B9 08000000 MOV ECX,8
0052F96A |. 83EC 10 SUB ESP,10
0052F96D |. BE 0B400000 MOV ESI,400B
0052F972 |. 890F MOV DWORD PTR DS:[EDI],ECX
0052F974 |. 8B4D DC MOV ECX,DWORD PTR SS:[EBP-24]
0052F977 |. 8D55 E8 LEA EDX,DWORD PTR SS:[EBP-18]
0052F97A |. 894F 04 MOV DWORD PTR DS:[EDI+4],ECX
0052F97D |. 8BCC MOV ECX,ESP
0052F97F |. 6A 02 PUSH 2
0052F981 |. 6A 02 PUSH 2
0052F983 |. 8947 08 MOV DWORD PTR DS:[EDI+8],EAX
0052F986 |. 8B45 E4 MOV EAX,DWORD PTR SS:[EBP-1C]
0052F989 |. 8947 0C MOV DWORD PTR DS:[EDI+C],EAX
0052F98C |. 8B45 BC MOV EAX,DWORD PTR SS:[EBP-44]
0052F98F |. 8931 MOV DWORD PTR DS:[ECX],ESI
0052F991 |. 8941 04 MOV DWORD PTR DS:[ECX+4],EAX
0052F994 |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8]
0052F997 |. 50 PUSH EAX
0052F998 |. 8951 08 MOV DWORD PTR DS:[ECX+8],EDX
0052F99B |. 8B55 C4 MOV EDX,DWORD PTR SS:[EBP-3C]
0052F99E |. 8951 0C MOV DWORD PTR DS:[ECX+C],EDX
0052F9A1 |. FF15 68104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaRaise>; MSVBVM60.__vbaRaiseEvent
0052F9A7 |. 83C4 2C ADD ESP,2C
0052F9AA |. 68 B9F95200 PUSH Dft8.0052F9B9
0052F9AF |. 8D4D EC LEA ECX,DWORD PTR SS:[EBP-14]
0052F9B2 |. FF15 34144000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFreeS>; MSVBVM60.__vbaFreeStr
0052F9B8 \. C3 RETN ; <-------------------------- FINISH routine
0052F9B9 . 8B4D 10 MOV ECX,DWORD PTR SS:[EBP+10]
0052F9BC . 66:8B55 E8 MOV DX,WORD PTR SS:[EBP-18]
0052F9C0 . 5F POP EDI
0052F9C1 . 5E POP ESI
0052F9C2 . 66:8911 MOV WORD PTR DS:[ECX],DX
0052F9C5 . 8B4D F0 MOV ECX,DWORD PTR SS:[EBP-10]
0052F9C8 . 33C0 XOR EAX,EAX
0052F9CA . 64:890D 000000>MOV DWORD PTR FS:[0],ECX
0052F9D1 . 5B POP EBX
0052F9D2 . 8BE5 MOV ESP,EBP
0052F9D4 . 5D POP EBP
0052F9D5 . C2 0C00 RETN 0C

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top