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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x334
mov eax, dword [0x4bd0c8]
xor eax, esp
mov dword [esp + 0x330], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, edx
mov dword [esp + 0xc], eax
test edi, edi
je 0x4133c5
cmp edi, 0xffffffff
je 0x4133c5
test eax, eax
je 0x4133c5
mov ecx, 0x5a4d
cmp word [edi], cx
jne 0x4133c5
mov ecx, dword [edi + 0x3c]
cmp dword [ecx + edi], 0x4550
jne 0x4133c5
mov edx, dword [ecx + edi + 0x7c]
mov dword [esp + 0x24], edx
test edx, edx
je 0x4133c5
mov ecx, dword [ecx + edi + 0x78]
add ecx, edi
mov dword [esp + 0x20], ecx
je 0x4133c5
mov esi, dword [ecx + 0x14]
test esi, esi
je 0x4133c5
mov eax, dword [ecx + 0x24]
mov edx, dword [ecx + 0x20]
add eax, edi
mov ebx, dword [ecx + 0x1c]
add edx, edi
add ebx, edi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], ebx
cmp eax, 0xffff
jg 0x413251
movzx eax, ax
mov edx, eax
sub edx, dword [ecx + 0x10]
cmp edx, eax
ja 0x4133c5
cmp edx, esi
jae 0x4133c5
mov eax, dword [ebx + edx*4]
add eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.0046e348
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ecx + 0x18]
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x413301
mov ecx, dword [edx + ebx*4]
mov edx, eax
add ecx, edi
call fcn.0040e1e0
test al, al
jne 0x41329c
mov eax, dword [esp + 0xc]
inc ebx
mov edx, dword [esp + 0x14]
cmp ebx, dword [esp + 0x10]
jb 0x413264
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.0046e348
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
movzx eax, word [eax + ebx*2]
mov esi, dword [esi + eax*4]
add esi, edi
je 0x413301
mov eax, dword [esp + 0x20]
cmp esi, eax
jb 0x413301
add eax, dword [esp + 0x24]
cmp esi, eax
ja 0x413301
lea ecx, [esp + 0x28]
mov edx, 0x103
mov eax, ecx
sub esi, eax
nop dword [eax]
mov al, byte [esi + ecx]
mov byte [ecx], al
test al, al
je 0x4132df
inc ecx
sub edx, 1
jne 0x4132d0
mov byte [ecx], 0
xor eax, eax
cmp byte [esp + 0x28], al
je 0x4132ff
nop word [eax + eax]
cmp byte [esp + eax + 0x28], 0x2e
je 0x41331a
inc eax
cmp byte [esp + eax + 0x28], 0
jne 0x4132f0
xor esi, esi
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.0046e348
mov esp, ebp
pop ebp
ret 4
cmp eax, 0x104
jae 0x4133de
lea esi, [esp + 0x29]
mov byte [esp + eax + 0x28], 0
add esi, eax
je 0x4132ff
lea edx, [esp + 0x28]
lea ecx, [edx + 1]
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x413340
sub edx, ecx
xor ecx, ecx
nop dword [eax + eax]
cmp ecx, edx
jae 0x41336b
movsx ax, byte [esp + ecx + 0x28]
mov word [esp + ecx*2 + 0x130], ax
inc ecx
cmp ecx, 0x103
jb 0x413350
xor eax, eax
mov edx, str..dll
mov word [esp + ecx*2 + 0x130], ax
push ecx
lea ecx, [esp + 0x134]
call fcn.0040e0e0
add esp, 4
lea ecx, [esp + 0x130]
call fcn.004107f0
test eax, eax
je 0x41339f
cmp eax, 0xffffffff
jne 0x4133b3
lea ecx, [esp + 0x130]
call fcn.00413120
test eax, eax
je 0x4132ff
push 0
mov edx, esi
mov ecx, eax
call fcn.00413170
mov esi, eax
jmp 0x413301
mov ecx, dword [esp + 0x33c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0046e348
mov esp, ebp
pop ebp
ret 4
call fcn.0046e859
int3