Function at 0x46f908
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x46fb72
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0
je 0x46fb4f
mov ebx, dword [ebp + 8]
push 0x40
push ebx
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x46fb4f
cmp word [ebx], 0x5a4d
jne 0x46fb4f
mov esi, dword [ebx + 0x3c]
add esi, ebx
push 0xf8
push esi
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x46fb4f
cmp dword [esi], 0x4550
jne 0x46fb4f
lea edi, [esi + 0x78]
test edi, edi
je 0x46fb4f
cmp dword [edi], 0
je 0x46fb4f
mov esi, dword [edi]
add esi, ebx
push 0x28
push esi
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x46fb4f
mov eax, dword [esi + 0x20]
add eax, ebx
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x24]
add eax, ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x1c]
add eax, ebx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
cmp eax, 0xffff
jle 0x46fa5c
mov dword [ebp - 0xc], 0xffffffff
mov eax, dword [esi + 0x18]
dec eax
test eax, eax
jl 0x46fa62
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 8]
shl eax, 2
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
push 4
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x46fa52
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx]
add edx, ebx
call sub.rtl70.bpl__System__LStrFromPChar_qqrr17System_AnsiStringpc
lea eax, [ebp - 0x2c]
mov edx, dword [ebp + 0xc]
call sub.rtl70.bpl__System__LStrFromPChar_qqrr17System_AnsiStringpc
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x46fa52
mov eax, dword [ebp - 8]
add eax, eax
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
push 2
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x46fa52
mov eax, dword [ebp - 0x24]
movzx eax, word [eax]
mov dword [ebp - 0xc], eax
inc dword [ebp - 8]
dec dword [ebp - 0x28]
jne 0x46f9ed
jmp 0x46fa62
sub eax, dword [esi + 0x10]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jl 0x46fb4f
mov eax, dword [ebp - 0xc]
cmp eax, dword [esi + 0x14]
jg 0x46fb4f
mov esi, dword [ebp - 0xc]
shl esi, 2
add esi, dword [ebp - 0x18]
push 4
push esi
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x46fb4f
mov eax, dword [edi]
cmp eax, dword [esi]
ja 0x46fa9e
add eax, dword [edi + 4]
cmp eax, dword [esi]
jae 0x46fab3
cmp dword [esi], 0
je 0x46fb4f
mov eax, dword [esi]
add eax, ebx
mov dword [ebp - 4], eax
jmp 0x46fb4f
lea eax, [ebp - 0x10]
mov edx, dword [esi]
add edx, dword [ebp + 8]
call sub.rtl70.bpl__System__LStrFromPChar_qqrr17System_AnsiStringpc
mov edx, dword [ebp - 0x10]
mov eax, 0x46fb90
call sub.rtl70.bpl__System__LStrPos_qqrv
mov ebx, eax
test ebx, ebx
jbe 0x46fb4f
lea eax, [ebp - 0x30]
push eax
mov edi, ebx
dec edi
mov ecx, edi
mov edx, 1
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__System__LStrCopy_qqrv
mov eax, dword [ebp - 0x30]
call sub.rtl70.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
call sub.kernel32.dll_GetModuleHandleA
mov esi, eax
test esi, esi
jne 0x46fb20
lea eax, [ebp - 0x34]
push eax
mov ecx, edi
mov edx, 1
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__System__LStrCopy_qqrv
mov eax, dword [ebp - 0x34]
call sub.rtl70.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
test esi, esi
je 0x46fb4f
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__System__LStrLen_qqrx17System_AnsiString
mov ecx, eax
lea edx, [ebx + 1]
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__System__LStrCopy_qqrv
mov eax, dword [ebp - 0x38]
call sub.rtl70.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
push esi
call fcn.0046f63c
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46fb79
lea eax, [ebp - 0x38]
mov edx, 4
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x10]
call sub.rtl70.bpl__System__LStrClr_qqrpv
ret