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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
xor ebx, ebx
push edi
xor esi, esi
mov dword [ebp - 0xc], 0x7918
inc ebx
mov eax, 0x92492493
imul ebx
add edx, ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, ebx
sub eax, ecx
jne 0x402578
inc ebx
cmp ebx, 0x4ac4
jl 0x402554
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x402768
cmp dword [ebp + 0x10], esi
jne 0x402599
cmp dword [ebp + 0x18], esi
je 0x402768
mov ecx, 0x56f3
mov edi, edi
mov eax, 0x8c08c08d
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4025a0
mov eax, dword [ebx + 0x3c]
add eax, ebx
mov dword [ebp - 4], eax
mov ecx, 0x235
mov eax, 0xaf3addc7
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4025c2
mov eax, 0x5a4d
cmp word [ebx], ax
jne 0x402768
mov eax, dword [ebp - 4]
cmp dword [eax], 0x4550
jne 0x402768
mov eax, dword [eax + 0x7c]
mov dword [ebp - 8], eax
mov ecx, 0x61c6
nop
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402600
cmp dword [ebp - 8], esi
je 0x402768
mov edi, 0x7e71
mov eax, 0x2e8ba2e9
imul edi
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x402623
mov ecx, dword [ebp - 4]
mov edi, 0x188e
mov ecx, dword [ecx + 0x78]
add ecx, ebx
mov dword [ebp - 4], ecx
mov ecx, 0x7e03
jmp 0x402650
mov eax, 0x6bca1af3
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402650
mov ecx, dword [ebp - 4]
mov edx, 0x1fb
mov dword [ebp - 0x10], 0x42
mov eax, 0x37
cmp eax, 0x42
cmovg eax, dword [ebp - 0x10]
dec edx
jne 0x402677
mov eax, dword [ecx + 0x20]
add eax, ebx
mov dword [ebp - 0x10], eax
mov ecx, 0x2dea
mov edi, edi
mov eax, 0x66666667
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402690
mov ecx, dword [ebp - 4]
mov edx, 0x14
mov eax, dword [ecx + 0x24]
add eax, ebx
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 0x1c]
add eax, ebx
mov dword [ebp - 0x18], eax
mov eax, 0x2966
mov ebx, 0xcc
cmp edx, ebx
cmovg edx, ebx
dec eax
jne 0x4026c5
mov edx, dword [ebp + 0x10]
mov eax, edx
shr eax, 0x10
test eax, eax
je 0x402703
xor ebx, ebx
cmp dword [ecx + 0x18], ebx
jbe 0x402703
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + ebx*4]
add eax, dword [ebp + 0xc]
push eax
push edx
call fcn.00403070
add esp, 8
test eax, eax
jne 0x402771
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0x10]
inc ebx
cmp ebx, dword [eax + 0x18]
jb 0x4026e0
mov ecx, 0x608c
mov edx, 0xad
mov eax, 0x82
cmp eax, 0xad
cmovl eax, edx
dec ecx
jne 0x402712
lea ecx, [ecx]
mov eax, 0xd20d20d3
imul edi
add edx, edi
sar edx, 7
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x402720
inc esi
mov eax, esi
and eax, 0x80000007
jns 0x402744
dec eax
or eax, 0xfffffff8
inc eax
jne 0x402749
add esi, 2
cmp esi, 0x30a3
jl 0x402735
mov eax, 0x78787879
imul dword [ebp - 0xc]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0xc], eax
jne 0x402751
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
movzx eax, word [eax + ebx*2]
mov ecx, dword [ecx + eax*4]
add ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
cmp ecx, eax
jbe 0x40278f
add eax, dword [ebp - 8]
cmp ecx, eax
jb 0x402768
pop edi
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret