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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x330
mov eax, dword [0x46b008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x314], edx
test ebx, ebx
je 0x409ab0
cmp ebx, 0xffffffff
je 0x409ab0
test edx, edx
je 0x409ab0
mov eax, 0x5a4d
cmp word [ebx], ax
jne 0x409ab0
mov eax, dword [ebx + 0x3c]
cmp dword [eax + ebx], 0x4550
jne 0x409ab0
mov ecx, dword [eax + ebx + 0x7c]
mov dword [ebp - 0x330], ecx
test ecx, ecx
je 0x409ab0
mov edx, dword [eax + ebx + 0x78]
add edx, ebx
mov dword [ebp - 0x32c], edx
je 0x409ab0
mov ecx, dword [edx + 0x14]
test ecx, ecx
je 0x409ab0
mov eax, dword [edx + 0x24]
push esi
mov esi, dword [edx + 0x20]
add eax, ebx
push edi
mov edi, dword [edx + 0x1c]
add esi, ebx
add edi, ebx
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp - 0x314]
mov dword [ebp - 0x324], esi
mov dword [ebp - 0x328], edi
cmp eax, 0x1000
jae 0x40990d
cmp eax, ecx
jae 0x4098f8
mov ecx, dword [ebp - 0x31c]
movzx eax, word [ecx + eax*2]
mov eax, dword [edi + eax*4]
pop edi
pop esi
add eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b616
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b616
mov esp, ebp
pop ebp
ret 4
mov edx, dword [edx + 0x18]
xor ecx, ecx
xor edi, edi
mov dword [ebp - 0x318], ecx
mov dword [ebp - 0x320], edx
test edx, edx
je 0x409a07
mov esi, dword [esi + ecx*4]
mov ecx, eax
add esi, ebx
mov dl, byte [esi]
test dl, dl
jne 0x409939
cmp byte [eax], dl
je 0x409991
mov al, byte [eax]
or dl, 0x20
or al, 0x20
cmp dl, al
jne 0x40996a
mov edx, dword [ebp - 0x314]
sub esi, edx
lea esp, [esp]
mov dl, byte [esi + ecx + 1]
lea ecx, [ecx + 1]
test dl, dl
jne 0x40995f
cmp byte [ecx], dl
je 0x409991
mov al, byte [ecx]
or dl, 0x20
or al, 0x20
cmp dl, al
je 0x409950
mov ecx, dword [ebp - 0x318]
inc ecx
mov dword [ebp - 0x318], ecx
cmp ecx, dword [ebp - 0x320]
jae 0x409a07
mov eax, dword [ebp - 0x314]
mov esi, dword [ebp - 0x324]
jmp 0x409928
mov eax, dword [ebp - 0x318]
mov ecx, dword [ebp - 0x31c]
mov edi, dword [ebp - 0x328]
movzx eax, word [ecx + eax*2]
mov edi, dword [edi + eax*4]
add edi, ebx
je 0x409a07
mov eax, dword [ebp - 0x32c]
cmp edi, eax
jb 0x409a07
mov ecx, dword [ebp - 0x330]
add eax, ecx
cmp edi, eax
ja 0x409a07
xor eax, eax
mov cl, byte [edi + eax]
test cl, cl
je 0x4099dc
mov byte [ebp + eax - 0x108], cl
inc eax
cmp eax, 0x103
jb 0x4099c6
mov byte [ebp + eax - 0x108], 0
xor eax, eax
cmp byte [ebp - 0x108], al
je 0x409a05
mov edi, edi
cmp byte [ebp + eax - 0x108], 0x2e
je 0x409a1c
inc eax
cmp byte [ebp + eax - 0x108], 0
jne 0x4099f0
xor edi, edi
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b616
mov esp, ebp
pop ebp
ret 4
cmp eax, 0x104
jae 0x409ac3
lea esi, [ebp - 0x107]
mov byte [ebp + eax - 0x108], 0
add esi, eax
je 0x409a05
lea edx, [ebp - 0x108]
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x409a42
sub edx, ecx
xor ecx, ecx
lea ecx, [ecx]
cmp ecx, edx
jae 0x409a6e
movsx ax, byte [ebp + ecx - 0x108]
mov word [ebp + ecx*2 - 0x310], ax
inc ecx
cmp ecx, 0x103
jb 0x409a50
xor eax, eax
mov word [ebp + ecx*2 - 0x310], ax
lea ecx, [ebp - 0x310]
push str..dll
call fcn.004080c0
add esp, 4
lea ecx, [ebp - 0x310]
call fcn.00409790
test eax, eax
je 0x409a05
push 0
mov edx, esi
mov ecx, eax
call fcn.00409820
mov edi, eax
jmp 0x409a07
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop ebx
call fcn.0041b616
mov esp, ebp
pop ebp
ret 4
call fcn.0041ba2e
int3