Function at 0x406020
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0xc8]
cmp eax, dword [ecx + 8]
jbe 0x40685a
sub esp, 0x148
movzx edx, byte [esp + 0x159]
movzx eax, dl
cmp eax, 8
jae 0x40684f
lea ecx, [0x591300]
lea ecx, [ecx + eax*8]
mov edx, dword [ecx]
mov ecx, dword [ecx + 4]
movzx ebx, byte [esp + 0x158]
test bl, bl
je 0x406801
mov ebp, dword [esp + 0x150]
test ebp, ebp
jge 0x40608e
lea esi, [0x591340]
lea esi, [esi + eax*8]
mov edx, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esp + 0x138], edx
mov dword [esp + 0x54], ecx
lea edi, [esp + 0xc4]
xor eax, eax
call fcn.004597e7
lea ecx, [esp + 0xc4]
mov dword [esp], ecx
lea ebx, [0x4e6da2]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0xf
call fcn.00459f00
mov ecx, dword [esp + 0x150]
mov edx, dword [esp + 0x138]
mov ebx, dword [esp + 0x150]
movzx ebp, byte [esp + 0x158]
mov esi, dword [esp + 0x154]
mov eax, dword [esp + 0x54]
mov edi, dword [esp + 0x14c]
mov dword [esp + 0x94], eax
xor eax, eax
mov dword [esp + 0x50], eax
mov eax, 0xf
mov dword [esp + 0x58], eax
mov eax, 0x64
mov dword [esp + 0x64], eax
lea eax, [esp + 0xc4]
mov dword [esp + 0x13c], eax
mov eax, dword [esp + 0x94]
jmp 0x40616c
inc ebp
mov esi, dword [esp + 0x138]
mov esi, dword [esp + 0x154]
mov dword [esp + 0x50], ebp
mov dword [esp + 0x58], edx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x13c], edi
mov edx, dword [esp + 0x138]
mov ebx, dword [esp + 0x150]
movzx ebp, byte [esp + 0x158]
mov edi, dword [esp + 0x14c]
mov ebx, dword [esp + 0x50]
cmp ebx, eax
jge 0x4067c5
jae 0x406846
movzx esi, byte [edx + ebx]
xchg esi, eax
cmp al, 0x25
xchg esi, eax
je 0x40622b
mov ebp, dword [esp + 0x58]
lea edx, [ebp + 1]
mov ebx, dword [esp + 0x64]
cmp ebx, edx
jb 0x4061cd
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x13c]
mov dword [esp + 0x144], eax
mov eax, dword [esp + 0x8c]
mov edi, dword [esp + 0x144]
xchg esi, eax
mov byte [edi + ebp], al
xchg esi, eax
mov ebp, dword [esp + 0x50]
jmp 0x40612d
xchg esi, eax
mov byte [esp + 0x23], al
xchg esi, eax
lea eax, [0x4cfd80]
mov dword [esp], eax
mov ecx, dword [esp + 0x13c]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], edx
call fcn.00441e00
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
lea edx, [ecx + 1]
mov ecx, dword [esp + 0x150]
mov ebp, dword [esp + 0x58]
movzx esi, byte [esp + 0x23]
mov edi, dword [esp + 0x14c]
mov dword [esp + 0x144], eax
mov eax, dword [esp + 0x54]
jmp 0x4061b8
lea esi, [ebx + 1]
cmp esi, eax
jae 0x40683d
mov dword [esp + 0x50], esi
movzx ebx, byte [ebx + edx + 1]
cmp bl, 0x78
jne 0x406512
nop
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x4064f3
test ecx, ecx
jge 0x4064f3
mov ebx, dword [esp + 0x58]
lea ebp, [ebx + 1]
mov edx, dword [esp + 0x64]
cmp edx, ebp
jb 0x406499
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x13c]
mov dword [esp + 0x140], eax
mov eax, dword [esp + 0x84]
xor esi, esi
sub esi, edi
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x140]
mov byte [esi + ebx], 0x2d
mov ebx, 0
sbb ebx, ecx
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x60], edx
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x140], esi
lea edi, [esp + 0x9c]
xor eax, eax
call fcn.004597fb
mov ecx, dword [esp + 0x38]
mov edi, 0x13
jmp 0x4062fb
mov byte [esp + ebx + 0x9c], dl
lea edi, [ebx - 1]
mov edx, dword [esp + 0x60]
mov ebp, dword [esp + 0x5c]
mov ecx, eax
mov ebx, esi
xor eax, eax
mov esi, dword [esp + 0x140]
test ebx, ebx
xchg esi, ebx
seta bl
xchg esi, ebx
cmp ecx, 0xa
setae dl
test ebx, ebx
xchg ebp, ebx
sete bl
xchg ebp, ebx
and ebp, edx
or ebp, esi
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x4063c0
mov dword [esp + 0x38], ecx
mov dword [esp + 0x4c], edi
mov eax, 0xcccccccd
mul ebx
shr edx, 3
lea ebp, [edx + edx*4]
shl ebp, 1
sub ebx, ebp
mov eax, 0x19999999
mov ebp, edx
mul ebx
mov dword [esp + 0x78], edx
mov dword [esp + 0x74], eax
mov esi, eax
mov eax, 0xcccccccd
mul ecx
shr edx, 3
mov eax, edx
add edx, 0
add esi, edx
lea ebx, [ebx + ebx*2]
lea edi, [eax + eax*4]
shl edi, 1
sub ecx, edi
lea ebx, [ecx + ebx*2]
mov ecx, eax
mov eax, 0xcccccccd
mov edi, edx
mul ebx
shr edx, 3
mov dword [esp + 0x70], edx
mov ebx, esi
add esi, edx
mov eax, 0xa
mul esi
mov edx, dword [esp + 0x38]
sub edx, eax
add edx, 0x30
add ecx, 0
adc ebp, 0
mov eax, esi
mov esi, dword [esp + 0x74]
add esi, edi
mov esi, dword [esp + 0x78]
adc esi, ebp
mov ebp, dword [esp + 0x70]
add ebx, ebp
adc esi, 0
mov ebx, dword [esp + 0x4c]
cmp ebx, 0x14
jb 0x4062dc
jmp 0x406831
add ecx, 0x30
cmp edi, 0x14
jae 0x406825
mov byte [esp + edi + 0x9c], cl
mov ecx, dword [esp + 0x5c]
mov edx, ecx
sub ecx, edi
add ecx, 0x14
mov dword [esp + 0x28], ecx
lea ebx, [edi - 0x14]
neg ebx
mov ebp, ebx
neg ebx
sar ebx, 0x1f
and edi, ebx
lea ebx, [esp + edi + 0x9c]
mov esi, dword [esp + 0x60]
cmp ecx, esi
ja 0x40644d
mov edi, dword [esp + 0x140]
mov dword [esp + 0x30], esi
mov dword [esp + 0x130], edi
lea eax, [edi + edx]
mov dword [esp], eax
mov dword [esp + 4], ebx
mov dword [esp + 8], ebp
call fcn.00459f00
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x130]
mov ebp, dword [esp + 0x50]
mov ebx, eax
mov edi, edx
mov eax, dword [esp + 0x54]
mov edx, ecx
mov ecx, dword [esp + 0x150]
jmp 0x40612d
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x134], ebx
lea eax, [0x4cfd80]
mov dword [esp], eax
mov ebx, dword [esp + 0x140]
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ecx
call fcn.00441e00
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x134]
mov ebp, dword [esp + 0x6c]
jmp 0x406406
lea eax, [0x4cfd80]
mov dword [esp], eax
mov ecx, dword [esp + 0x13c]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebp
call fcn.00441e00
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebp, [ecx + 1]
mov ecx, dword [esp + 0x150]
mov ebx, dword [esp + 0x58]
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x14c]
mov dword [esp + 0x140], eax
mov eax, dword [esp + 0x54]
jmp 0x40628a
mov edx, dword [esp + 0x64]
mov ebp, dword [esp + 0x58]
mov esi, dword [esp + 0x13c]
mov ebx, dword [esp + 0x150]
mov dword [esp + 0x38], edi
jmp 0x4062b4
cmp bl, 0x79
jne 0x4067b1
mov ebx, dword [esp + 0x154]
sar ebx, 0x1f
test ebx, ebx
jge 0x406794
mov ecx, dword [esp + 0x58]
lea ebp, [ecx + 1]
mov edx, dword [esp + 0x64]
cmp edx, ebp
jb 0x406739
xor esi, esi
mov ecx, dword [esp + 0x154]
sub esi, ecx
mov dword [esp + 0x40], esi
mov ecx, dword [esp + 0x58]
mov esi, dword [esp + 0x13c]
mov byte [esi + ecx], 0x2d
mov ecx, 0
sbb ecx, ebx
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x13c], esi
mov dword [esp + 0x58], ebp
mov dword [esp + 0x64], edx
lea edi, [esp + 0xb0]
xor eax, eax
call fcn.004597fb
mov ecx, dword [esp + 0x68]
mov edi, 0x13
jmp 0x4065b6
mov byte [esp + edx + 0xb0], al
lea eax, [edx - 1]
mov edx, dword [esp + 0x64]
mov ebp, dword [esp + 0x58]
mov esi, dword [esp + 0x13c]
mov ebx, ecx
mov ecx, edi
mov edi, eax
xor eax, eax
test ecx, ecx
xchg esi, ebx
sete bl
xchg esi, ebx
seta dl
cmp ebx, 0xa
xchg ebp, ebx
setae bl
xchg ebp, ebx
and ebp, esi
or edx, ebp
test dl, dl
je 0x406678
mov dword [esp + 0x34], ebx
mov dword [esp + 0x48], edi
mov eax, 0xcccccccd
mul ebx
shr edx, 3
mov ebp, edx
add edx, 0
mov eax, 0xcccccccd
mov esi, edx
mul ecx
shr edx, 3
mov dword [esp + 0x78], edx
lea edi, [edx + edx*4]
shl edi, 1
sub ecx, edi
mov eax, 0x19999999
mul ecx
mov dword [esp + 0x74], eax
add eax, esi
lea edi, [ebp + ebp*4]
shl edi, 1
sub ebx, edi
lea edi, [ecx + ecx*2]
lea ebx, [ebx + edi*2]
mov ecx, eax
mov eax, 0xcccccccd
mov edi, edx
mul ebx
shr edx, 3
mov dword [esp + 0x70], edx
mov ebx, ecx
add ecx, edx
mov eax, ecx
mov edx, 0xa
mul edx
mov edx, dword [esp + 0x34]
sub edx, eax
add edx, 0x30
add ebp, 0
mov ebp, dword [esp + 0x78]
adc ebp, 0
mov eax, edx
mov edx, dword [esp + 0x74]
add edx, esi
adc edi, ebp
mov edx, dword [esp + 0x70]
add ebx, edx
adc edi, 0
mov edx, dword [esp + 0x48]
cmp edx, 0x14
jb 0x406595
jmp 0x406819
add ebx, 0x30
cmp edi, 0x14
jae 0x40680d
mov byte [esp + edi + 0xb0], bl
mov ecx, dword [esp + 0x58]
mov edx, ecx
sub ecx, edi
add ecx, 0x14
mov dword [esp + 0x24], ecx
lea ebx, [edi - 0x14]
neg ebx
mov ebp, ebx
neg ebx
sar ebx, 0x1f
and edi, ebx
lea ebx, [esp + edi + 0xb0]
mov esi, dword [esp + 0x64]
cmp esi, ecx
jb 0x4066f0
mov edi, dword [esp + 0x13c]
mov dword [esp + 0x128], edi
mov dword [esp + 0x2c], esi
lea eax, [edi + edx]
mov dword [esp], eax
mov dword [esp + 4], ebx
mov dword [esp + 8], ebp
call fcn.00459f00
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x128]
jmp 0x406433
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x12c], ebx
lea eax, [0x4cfd80]
mov dword [esp], eax
mov ebx, dword [esp + 0x13c]
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ecx
call fcn.00441e00
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x58]
mov ebx, dword [esp + 0x12c]
mov ebp, dword [esp + 0x6c]
jmp 0x4066be
mov dword [esp + 0x44], ebx
lea eax, [0x4cfd80]
mov dword [esp], eax
mov ebx, dword [esp + 0x13c]
mov dword [esp + 4], ebx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebp
call fcn.00441e00
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebp, [ecx + 1]
mov ecx, dword [esp + 0x58]
mov ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x14c]
mov dword [esp + 0x13c], eax
mov eax, dword [esp + 0x54]
jmp 0x406540
mov ebp, dword [esp + 0x58]
mov edx, dword [esp + 0x64]
mov esi, dword [esp + 0x13c]
mov ecx, ebx
mov ebx, dword [esp + 0x154]
jmp 0x406569
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x13c]
jmp 0x406433
mov dword [esp], 0
mov eax, dword [esp + 0x13c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
call fcn.00445240
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x15c], eax
mov dword [esp + 0x160], ecx
add esp, 0x148
ret
mov ebp, dword [esp + 0x150]
jmp 0x40608e
mov eax, edi
mov ecx, 0x14
call fcn.00459650
mov eax, edx
mov ecx, 0x14
call fcn.00459650
mov eax, edi
mov ecx, 0x14
call fcn.00459650
mov eax, ebx
mov ecx, 0x14
call fcn.00459650
mov ecx, eax
mov eax, esi
call fcn.00459650
mov ecx, eax
mov eax, ebx
call fcn.00459650
mov ecx, 8
call fcn.00459650
nop
call fcn.00458070
jmp fcn.00406020