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

Disassembly:
sub esp, 0x24
push esi
mov esi, ecx
mov dword [esp + 0x24], edx
cmp dword [esi + 0xb4], 0
je 0x40c5d4
push dword [esi]
mov eax, dword [esi + 4]
call eax
mov dword [esi + 0xb4], 0
cmp dword [esi + 0xac], 0
mov eax, dword [esi + 0xd0]
jne 0x40cec0
test eax, eax
jne 0x40cec0
cmp dword [esi + 0x88], eax
je 0x40c601
mov dword [esi + 0xd0], 9
cmp dword [esi + 0x2b4], 0
je 0x40c614
mov dword [esi + 0xd0], 8
mov eax, dword [esi + 0xd0]
test eax, eax
je 0x40c62f
mov dword [esi + 0xac], 1
pop esi
add esp, 0x24
ret 4
push edi
mov edi, dword [esi + 0xb8]
mov eax, edi
or eax, dword [esi + 0xbc]
mov dword [esp + 0xc], edi
mov dword [esp + 0x1c], edi
jne 0x40c69e
push dword [esi]
mov eax, dword [esi + 8]
call eax
mov ecx, esi
test eax, eax
jne 0x40c664
mov edx, edi
call fcn.0040bd40
pop edi
pop esi
add esp, 0x24
ret 4
lea edx, [esp + 0x24]
call fcn.0040a4a0
lea edx, [esi + 0x1e9c]
lea ecx, [esi + 0x58]
call fcn.00409d10
push dword [esi]
mov eax, dword [esi + 0xc]
call eax
sub eax, dword [esi + 0x34]
lea ecx, [esi + 0x58]
mov edx, dword [esi + 0x50]
mov al, byte [eax]
movzx eax, al
push eax
call fcn.00409d50
dec dword [esi + 0x34]
inc edi
mov dword [esp + 0xc], edi
mov eax, dword [esi + 8]
push ebx
push ebp
push dword [esi]
call eax
test eax, eax
je 0x40ce9d
lea ebx, [esi + 0x58]
jmp 0x40c6c4
mov edi, dword [esp + 0x14]
cmp dword [esi + 0xa4], 0
je 0x40c6da
mov ecx, esi
call fcn.0040b850
mov dword [esp + 0x1c], eax
jmp 0x40c714
mov ecx, dword [esi + 0x18]
cmp dword [esi + 0x1c], ecx
jne 0x40c6f1
mov edx, edi
mov ecx, esi
call fcn.0040a5f0
mov dword [esp + 0x1c], eax
jmp 0x40c714
mov eax, ecx
shl eax, 5
mov edx, dword [eax + esi + 0xbcac]
mov eax, dword [eax + esi + 0xbcb0]
mov dword [esi + 0x90], eax
lea eax, [ecx + 1]
mov dword [esp + 0x1c], edx
mov dword [esi + 0x18], eax
mov ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x2c]
and ecx, edi
mov edi, dword [ebx]
mov ebp, edi
shl eax, 4
add eax, ecx
mov dword [esp + 0x20], ecx
movzx ecx, word [esi + eax*2 + 0x1e9c]
shr ebp, 0xb
imul ebp, ecx
lea edx, [esi + eax*2]
mov eax, dword [esi + 0x90]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x40c7ec
mov eax, 0x800
sub eax, ecx
shr eax, 5
add eax, ecx
mov word [edx + 0x1e9c], ax
cmp ebp, 0x1000000
jae 0x40c772
mov ecx, ebx
shl ebp, 8
call fcn.00409c70
push dword [esi]
mov eax, dword [esi + 0xc]
mov dword [ebx], ebp
call eax
mov ebp, dword [esp + 0x14]
mov edi, eax
sub edi, dword [esi + 0x34]
mov ecx, ebp
mov eax, dword [esi + 0x50]
shl ecx, 8
movzx edx, byte [edi - 1]
add edx, ecx
mov ecx, dword [esi + 0x94]
and edx, dword [esi + 0x48]
shl edx, cl
lea ecx, [edx + edx*2]
lea edx, [eax + ecx*2]
mov ecx, dword [esi + 0x2c]
mov al, byte [edi]
cmp ecx, 7
mov byte [esp + 0x13], al
movzx eax, byte [ecx + 0x4ffc68]
mov ecx, ebx
mov dword [esi + 0x2c], eax
jae 0x40c7d1
movzx eax, byte [esp + 0x13]
push eax
call fcn.00409d50
mov edi, dword [esp + 0x1c]
jmp 0x40cdc9
sub edi, dword [esi + 0x38]
movzx eax, byte [edi]
push eax
movzx eax, byte [esp + 0x17]
push eax
call fcn.00409df0
mov edi, dword [esp + 0x1c]
jmp 0x40cdc9
sub edi, ebp
mov eax, ecx
add dword [esi + 0x60], ebp
adc dword [esi + 0x64], 0
shr eax, 5
sub ecx, eax
mov word [edx + 0x1e9c], cx
cmp edi, 0x1000000
jae 0x40c815
mov ecx, ebx
shl edi, 8
call fcn.00409c70
mov eax, dword [esi + 0x2c]
mov ebp, edi
movzx ecx, word [esi + eax*2 + 0x1e3c]
lea edx, [esi + eax*2]
shr ebp, 0xb
imul ebp, ecx
cmp dword [esp + 0x18], 4
jae 0x40ca53
sub edi, ebp
mov eax, ecx
add dword [esi + 0x60], ebp
adc dword [esi + 0x64], 0
shr eax, 5
sub ecx, eax
mov word [edx + 0x1e3c], cx
cmp edi, 0x1000000
jae 0x40c85f
mov ecx, ebx
shl edi, 8
call fcn.00409c70
mov eax, dword [esi + 0x2c]
mov ecx, edi
mov ebp, dword [esp + 0x18]
add eax, 0xf2a
movzx edx, word [esi + eax*2]
lea eax, [esi + eax*2]
shr ecx, 0xb
imul ecx, edx
mov dword [esp + 0x28], eax
test ebp, ebp
jne 0x40c916
mov eax, 0x800
mov edi, ecx
sub eax, edx
shr eax, 5
add eax, edx
mov edx, dword [esp + 0x28]
mov word [edx], ax
cmp ecx, 0x1000000
jae 0x40c8ad
mov ecx, ebx
shl edi, 8
call fcn.00409c70
mov eax, dword [esi + 0x2c]
mov ebp, dword [esp + 0x20]
shl eax, 4
add eax, ebp
movzx ecx, word [esi + eax*2 + 0x201c]
lea edx, [esi + eax*2]
mov eax, edi
shr eax, 0xb
imul eax, ecx
cmp dword [esp + 0x1c], 1
je 0x40c8ef
sub edi, eax
add dword [esi + 0x60], eax
mov eax, ecx
adc dword [esi + 0x64], 0
shr eax, 5
sub ecx, eax
mov word [edx + 0x201c], cx
jmp 0x40ca08
mov edi, eax
mov eax, 0x800
sub eax, ecx
shr eax, 5
add eax, ecx
mov word [edx + 0x201c], ax
mov eax, dword [esi + 0x2c]
movzx eax, byte [eax + 0x4ffc5c]
mov dword [esi + 0x2c], eax
jmp 0x40ca08
sub edi, ecx
mov eax, edx
add dword [esi + 0x60], ecx
adc dword [esi + 0x64], 0
shr eax, 5
sub edx, eax
mov eax, dword [esp + 0x28]
mov word [eax], dx
cmp edi, 0x1000000
jae 0x40c93f
mov ecx, ebx
shl edi, 8
call fcn.00409c70
mov eax, dword [esi + 0x2c]
movzx ecx, word [esi + eax*2 + 0x1e6c]
lea edx, [esi + eax*2]
mov eax, edi
shr eax, 0xb
imul eax, ecx
cmp ebp, 1
jne 0x40c977
mov edi, eax
mov eax, 0x800
sub eax, ecx
shr eax, 5
add eax, ecx
mov word [edx + 0x1e6c], ax
mov ecx, dword [esi + 0x3c]
jmp 0x40c9fb
sub edi, eax
add dword [esi + 0x60], eax
mov eax, ecx
adc dword [esi + 0x64], 0
shr eax, 5
sub ecx, eax
mov word [edx + 0x1e6c], cx
cmp edi, 0x1000000
jae 0x40c9a0
mov ecx, ebx
shl edi, 8
call fcn.00409c70
mov eax, dword [esi + 0x2c]
movzx ecx, word [esi + eax*2 + 0x1e84]
lea edx, [esi + eax*2]
mov eax, edi
shr eax, 0xb
imul eax, ecx
cmp ebp, 2
jne 0x40c9d5
mov edi, eax
mov eax, 0x800
sub eax, ecx
shr eax, 5
add eax, ecx
mov word [edx + 0x1e84], ax
mov ecx, dword [esi + 0x40]
jmp 0x40c9f5
sub edi, eax
add dword [esi + 0x60], eax
mov eax, ecx
adc dword [esi + 0x64], 0
shr eax, 5
sub ecx, eax
mov word [edx + 0x1e84], cx
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x40]
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x3c]
mov dword [esi + 0x40], eax
mov eax, dword [esi + 0x38]
mov ebp, dword [esp + 0x20]
mov dword [esi + 0x3c], eax
mov dword [esi + 0x38], ecx
cmp edi, 0x1000000
jae 0x40ca1a
mov ecx, ebx
shl edi, 8
call fcn.00409c70
mov dword [ebx], edi
mov edi, dword [esp + 0x1c]
cmp edi, 1
je 0x40cdc5
push ebp
lea eax, [edi - 2]
mov edx, ebx
push eax
lea ecx, [esi + 0x289c]
call fcn.0040a060
mov eax, dword [esi + 0x2c]
dec dword [esi + 0xc4]
movzx eax, byte [eax + 0x4ffc44]
mov dword [esi + 0x2c], eax
jmp 0x40cdc5
mov eax, 0x800
sub eax, ecx
shr eax, 5
add eax, ecx
mov word [edx + 0x1e3c], ax
cmp ebp, 0x1000000
jae 0x40ca78
mov ecx, ebx
shl ebp, 8
call fcn.00409c70
mov eax, dword [esi + 0x2c]
lea ecx, [esi + 0x249c]
mov edi, dword [esp + 0x1c]
mov edx, ebx
mov dword [ebx], ebp
add edi, 0xfffffffe
mov ebp, dword [esp + 0x20]
movzx eax, byte [eax + 0x4ffc50]
push ebp
push edi
mov dword [esi + 0x2c], eax
call fcn.0040a060
mov eax, dword [esi + 0x40]
mov edx, dword [esp + 0x18]
mov dword [esi + 0x44], eax
sub edx, 4
mov eax, dword [esi + 0x3c]
mov dword [esi + 0x40], eax
mov eax, dword [esi + 0x38]
mov dword [esi + 0x3c], eax
lea eax, [edx + 1]
mov dword [esi + 0x38], eax
mov eax, edx
inc dword [esi + 0xc0]
mov dword [esp + 0x18], edx
cmp edx, 0x80
jae 0x40cae1
and eax, 0x7f
movzx edx, byte [eax + esi + 0x2c9c]
jmp 0x40cafc
cmp edx, 0x20000
sbb ecx, ecx
and ecx, 0xfffffff6
add ecx, 0x10
shr eax, cl
movzx eax, byte [eax + esi + 0x2c9c]
lea edx, [eax + ecx*2]
mov ebp, dword [ebx]
lea ecx, [esi + 0x219c]
mov dword [esp + 0x28], edx
mov eax, 3
add edx, 0x40
cmp dword [esp + 0x1c], 5
cmovb eax, edi
shl eax, 7
add ecx, eax
mov dword [esp + 0x2c], ecx
mov eax, edx
shr eax, 6
movzx edi, word [ecx + eax*2]
lea ebx, [ecx + eax*2]
mov ecx, edx
add edx, edx
shr ecx, 5
and ecx, 1
mov dword [esp + 0x20], edx
mov edx, ebp
mov eax, ecx
shr edx, 0xb
neg eax
imul edx, edi
and ebp, eax
and eax, edx
sub ebp, eax
add dword [esi + 0x60], eax
adc dword [esi + 0x64], 0
dec ecx
mov eax, ecx
and ecx, 0x7e1
sub ecx, edi
and eax, edx
add ecx, 0x1f
add ebp, eax
sar ecx, 5
add ecx, edi
mov word [ebx], cx
lea ebx, [esi + 0x58]
cmp ebp, 0x1000000
jae 0x40cb83
mov ecx, ebx
shl ebp, 8
call fcn.00409c70
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
cmp edx, 0x1000
jb 0x40cb21
mov eax, dword [esp + 0x18]
mov dword [ebx], ebp
cmp eax, 4
jb 0x40cdc1
mov edi, dword [esp + 0x28]
mov edx, edi
shr edx, 1
dec edx
cmp eax, 0x80
jae 0x40cbd3
and edi, 1
mov ecx, edx
or edi, 2
shl edi, cl
mov ecx, ebx
add edi, 0x11ce
push eax
push edx
lea edx, [esi + edi*2]
call fcn.00409fc0
jmp 0x40cdc1
mov ecx, 0x20
mov edi, eax
sub ecx, edx
or edi, 0xf
shl edi, cl
mov eax, edi
shr ebp, 1
shr eax, 0x1f
neg eax
and eax, ebp
add dword [esi + 0x60], eax
adc dword [esi + 0x64], 0
add edi, edi
cmp ebp, 0x1000000
jae 0x40cc07
mov ecx, ebx
shl ebp, 8
call fcn.00409c70
cmp edi, 0xf0000000
jne 0x40cbe1
movzx edi, word [esi + 0x1e1e]
mov edx, ebp
mov eax, dword [esp + 0x18]
mov ecx, eax
and ecx, 1
shr eax, 1
mov dword [esp + 0x18], eax
mov eax, ecx
shr edx, 0xb
neg eax
imul edx, edi
and ebp, eax
mov dword [esp + 0x2c], ecx
and eax, edx
sub ebp, eax
add dword [esi + 0x60], eax
adc dword [esi + 0x64], 0
dec ecx
mov eax, ecx
and ecx, 0x7e1
sub ecx, edi
and eax, edx
add ecx, 0x1f
add ebp, eax
sar ecx, 5
add ecx, edi
mov word [esi + 0x1e1e], cx
cmp ebp, 0x1000000
jae 0x40cc72
mov ecx, ebx
shl ebp, 8
call fcn.00409c70
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
add edx, 2
mov ecx, eax
mov dword [esp + 0x2c], edx
and ecx, 1
shr eax, 1
mov dword [esp + 0x18], eax
mov eax, ecx
movzx edi, word [esi + edx*2 + 0x1e1c]
neg eax
mov edx, ebp
mov dword [esp + 0x28], ecx
shr edx, 0xb
and ebp, eax
imul edx, edi
and eax, edx
sub ebp, eax
add dword [esi + 0x60], eax
adc dword [esi + 0x64], 0
dec ecx
mov eax, ecx
and ecx, 0x7e1
sub ecx, edi
and eax, edx
add ecx, 0x1f
add ebp, eax
sar ecx, 5
add ecx, edi
mov edi, dword [esp + 0x2c]
mov word [esi + edi*2 + 0x1e1c], cx
cmp ebp, 0x1000000
jae 0x40cce6
mov ecx, ebx
shl ebp, 8
call fcn.00409c70
mov eax, dword [esp + 0x28]
lea edx, [eax + edi*2]
mov eax, dword [esp + 0x18]
movzx edi, word [esi + edx*2 + 0x1e1c]
mov ecx, eax
and ecx, 1
shr eax, 1
mov dword [esp + 0x2c], edx
mov edx, ebp
mov dword [esp + 0x18], eax
mov eax, ecx
shr edx, 0xb
neg eax
imul edx, edi
and ebp, eax
mov dword [esp + 0x28], ecx
and eax, edx
sub ebp, eax
add dword [esi + 0x60], eax
adc dword [esi + 0x64], 0
dec ecx
mov eax, ecx
and ecx, 0x7e1
sub ecx, edi
and eax, edx
add ecx, 0x1f
add ebp, eax
sar ecx, 5
add ecx, edi
mov edi, dword [esp + 0x2c]
mov word [esi + edi*2 + 0x1e1c], cx
cmp ebp, 0x1000000
jae 0x40cd5a
mov ecx, ebx
shl ebp, 8
call fcn.00409c70
mov eax, dword [esp + 0x28]
mov edx, ebp
mov ecx, dword [esp + 0x18]
and ecx, 1
shr edx, 0xb
lea eax, [eax + edi*2]
movzx edi, word [esi + eax*2 + 0x1e1c]
lea ebx, [esi + eax*2]
imul edx, edi
mov eax, ecx
neg eax
and ebp, eax
and eax, edx
sub ebp, eax
add dword [esi + 0x60], eax
adc dword [esi + 0x64], 0
dec ecx
mov eax, ecx
and ecx, 0x7e1
sub ecx, edi
and eax, edx
add ecx, 0x1f
add ebp, eax
sar ecx, 5
add ecx, edi
mov word [ebx + 0x1e1c], cx
lea ebx, [esi + 0x58]
cmp ebp, 0x1000000
jae 0x40cdbf
mov ecx, ebx
shl ebp, 8
call fcn.00409c70
mov dword [ebx], ebp
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
add ebp, edi
sub dword [esi + 0x34], edi
mov dword [esp + 0x14], ebp
jne 0x40c6c0
cmp dword [esi + 0xa4], 0
jne 0x40ce57
cmp dword [esi + 0xc0], 0x40
jb 0x40ce1e
mov ecx, esi
call fcn.0040bdd0
mov ecx, esi
call fcn.0040c150
mov ecx, dword [esi + 0x9c]
lea eax, [esi + 0x748]
push eax
lea eax, [esi + 0x249c]
mov edx, 1
shl edx, cl
lea ecx, [esi + 0x349c]
push eax
call fcn.0040a320
cmp dword [esi + 0xc4], 0
jg 0x40ce57
mov ecx, dword [esi + 0x9c]
lea eax, [esi + 0x748]
push eax
lea eax, [esi + 0x289c]
mov dword [esi + 0xc4], 0x40
mov edx, 1
shl edx, cl
lea ecx, [esi + 0x78a0]
push eax
call fcn.0040a320
push dword [esi]
mov eax, dword [esi + 8]
call eax
test eax, eax
je 0x40cea1
mov edi, dword [esp + 0x14]
mov eax, edi
sub eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x30]
test ebp, ebp
je 0x40cec7
add eax, 0x92c
cmp eax, dword [esp + 0x38]
jae 0x40ce9d
mov ecx, dword [esi + 0x80]
sub ecx, dword [esi + 0x78]
mov eax, dword [esi + 0x68]
add ecx, dword [esi + 0x70]
add eax, 0x4000
add eax, ecx
cmp eax, ebp
jb 0x40c6c4
mov ebp, dword [esp + 0x14]
mov eax, ebp
mov edx, ebp
sub eax, dword [esp + 0x24]
mov ecx, esi
add dword [esi + 0xb8], eax
adc dword [esi + 0xbc], 0
call fcn.0040bd40
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x24
ret 4
cmp eax, 0x20000
jb 0x40c6c4
sub edi, dword [esp + 0x24]
mov ecx, esi
add dword [esi + 0xb8], edi
adc dword [esi + 0xbc], 0
call fcn.0040bcf0
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x24
ret 4