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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0xc], 0
mov ebx, edx
push edi
mov dword [ebp - 0x14], ebx
test dword [esi + 8], 0x80000
je 0x402672
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x40]
mov dword [ebp - 8], 1
cmp eax, dword [esi + 0x24]
jbe 0x402679
mov dword [ebp - 8], 0
cmp dword [esi], 0
jne 0x402699
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x8c]
mov eax, dword [eax]
sub eax, ecx
cmp eax, 0x14ccc
jb 0x402699
mov eax, dword [esi + 0x74]
add eax, ecx
jmp 0x40269f
lea eax, [esi + 0x39272]
mov cl, byte [esi + 0x38]
mov dword [esi + 0x30], eax
mov dword [ebp - 0x10], eax
add eax, 0x14cbc
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x2c]
mov dword [esi + 0x58], 0
mov dword [esi + 0x5c], 0
shr byte [eax], cl
xor ecx, ecx
cmp dword [esi + 0x38], 8
sete cl
sub dword [esi + 0x28], ecx
test dword [esi + 8], 0x1000
je 0x402753
cmp dword [esi + 0x64], 0
jne 0x402753
mov ecx, dword [esi + 0x44]
mov edx, 0x78
shl edx, cl
or edx, dword [esi + 0x48]
mov dword [esi + 0x48], edx
lea eax, [ecx + 8]
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x402724
nop dword [eax]
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40270d
mov byte [eax], dl
inc dword [esi + 0x30]
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
add eax, 0xfffffff8
shr edx, 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], eax
cmp eax, 8
jae 0x402700
bts edx, eax
add eax, 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x402753
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x402742
mov byte [eax], dl
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], 8
mov dl, byte [esi + 0x48]
jae 0x402735
mov ecx, dword [esi + 0x44]
xor edx, edx
cmp ebx, 4
sete dl
shl edx, cl
lea eax, [ecx + 1]
or edx, dword [esi + 0x48]
mov dword [esi + 0x48], edx
mov dword [ebp - 4], eax
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x40279f
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x402781
mov byte [eax], dl
inc dword [esi + 0x30]
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
add eax, 0xfffffff8
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dl, bl
mov dword [ebp - 4], eax
mov dword [esi + 0x44], eax
cmp eax, 8
jae 0x402774
jmp 0x4027a1
mov ebx, edx
cmp dword [ebp - 8], 0
mov edi, dword [esi + 0x30]
jne 0x4027ef
test dword [esi + 8], 0x40000
lea eax, [esi + 0x3c]
jne 0x4027c2
cmp dword [eax], 0x30
mov dword [ebp - 8], eax
jb 0x4027c2
xor edx, edx
jmp 0x4027ca
mov edx, 1
mov dword [ebp - 8], eax
mov ecx, esi
call fcn.00402550
mov ecx, dword [ebp - 8]
mov edx, dword [esi + 0x30]
mov dword [ebp - 0xc], eax
mov ecx, dword [ecx]
test ecx, ecx
je 0x402925
sub edx, edi
inc edx
cmp edx, ecx
jb 0x402925
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x24]
ja 0x402922
mov ecx, dword [ebp - 4]
add ecx, 2
mov dword [esi + 0x30], edi
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x40283c
mov edx, edi
cmp edi, dword [esi + 0x34]
jae 0x402821
mov byte [edi], bl
inc dword [esi + 0x30]
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov edi, edx
mov ebx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x402812
jmp 0x40283e
mov edx, edi
test ecx, ecx
je 0x402874
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], 8
nop dword [eax]
cmp edx, dword [esi + 0x34]
jae 0x40285d
mov byte [edx], bl
inc dword [esi + 0x30]
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x402850
mov edx, 2
nop dword [eax]
movzx eax, word [esi + 0x3c]
shl eax, cl
add ecx, 0x10
or eax, ebx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], eax
mov ebx, eax
cmp ecx, 8
jb 0x4028bc
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x4028a5
mov byte [eax], bl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x402898
xor dword [esi + 0x3c], 0xffff
sub edx, 1
jne 0x402880
cmp dword [esi + 0x3c], edx
jbe 0x402941
nop dword [eax]
mov eax, dword [esi + 0x40]
add eax, edx
and eax, 0x7fff
movzx eax, byte [eax + esi + 0x90]
shl eax, cl
add ecx, 8
or eax, ebx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], eax
mov ebx, eax
cmp ecx, 8
jb 0x40291a
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x402903
mov byte [eax], bl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x4028f6
inc edx
cmp edx, dword [esi + 0x3c]
jb 0x4028d0
jmp 0x402941
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x402941
mov eax, dword [ebp - 4]
mov edx, 1
mov ecx, esi
mov dword [esi + 0x30], edi
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], eax
call fcn.00402550
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x402aa6
mov ecx, dword [esi + 0x44]
cmp eax, 4
jne 0x4029ef
test ecx, ecx
je 0x402992
mov edx, dword [esi + 0x48]
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], 8
nop dword [eax]
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40297d
mov byte [eax], dl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
shr dword [esi + 0x48], 8
add ecx, 0xfffffff8
mov dl, byte [esi + 0x48]
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x402970
test dword [esi + 8], 0x1000
je 0x402aa6
mov edi, dword [esi + 0x18]
mov ebx, 4
mov edx, edi
shr edx, 0x18
shl edx, cl
add ecx, 8
or edx, dword [esi + 0x48]
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x4029e2
nop
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x4029cd
mov byte [eax], dl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
shr dword [esi + 0x48], 8
add ecx, 0xfffffff8
mov dl, byte [esi + 0x48]
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x4029c0
shl edi, 8
sub ebx, 1
jne 0x4029a7
jmp 0x402aa6
mov edx, dword [esi + 0x48]
add ecx, 3
xor ebx, ebx
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x402a26
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x402a0f
mov byte [eax], dl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr edx, 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x402a02
test ecx, ecx
je 0x402a58
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], 8
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x402a41
mov byte [eax], dl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr edx, 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x402a34
mov edi, 2
nop dword [eax]
movzx eax, bx
shl eax, cl
add ecx, 0x10
or eax, edx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], eax
mov edx, eax
cmp ecx, 8
jb 0x402a9b
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x402a84
mov byte [eax], dl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr edx, 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x402a77
xor ebx, 0xffff
sub edi, 1
jne 0x402a60
push 0x280
lea eax, [esi + 0x8192]
push 0
push eax
call fcn.00447e00
mov edi, dword [esi + 0x30]
lea eax, [esi + 0x9273]
inc dword [esi + 0x64]
add esp, 0xc
mov dword [esi + 0x28], eax
lea eax, [esi + 0x9272]
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x3c]
add dword [esi + 0x40], eax
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x38], 8
mov dword [esi + 0x3c], 0
sub edi, eax
je 0x402b80
cmp dword [esi], 0
je 0x402b35
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x84]
sub ecx, dword [esi + 0x70]
mov dword [eax], ecx
lea eax, [esi + 0x39272]
push dword [esi + 4]
push edi
mov edi, dword [esi]
mov ecx, edi
push eax
call dword [0x4751bc]
call edi
add esp, 0xc
test eax, eax
jne 0x402b80
pop edi
mov dword [esi + 0x6c], 0xffffffff
or eax, 0xffffffff
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esi + 0x39272]
cmp eax, edx
jne 0x402b7a
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x8c]
mov ebx, dword [eax]
mov eax, dword [esi + 0x74]
sub ebx, ecx
cmp edi, ebx
cmovb ebx, edi
add eax, ecx
push ebx
push edx
push eax
call fcn.00447fa0
add dword [esi + 0x8c], ebx
add esp, 0xc
sub edi, ebx
je 0x402b80
mov dword [esi + 0x5c], edi
mov eax, edi
pop edi
mov dword [esi + 0x58], ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add dword [esi + 0x8c], edi
mov eax, dword [esi + 0x5c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret