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

Disassembly:
push esi
mov esi, ecx
call fcn.0040be10
test eax, eax
jne 0x40ce63
mov eax, 2
pop esi
ret
push 0
push 0
mov ecx, esi
call fcn.0040c750
neg eax
sbb eax, eax
add eax, 2
pop esi
ret
sub esp, 0x74
push ebp
push esi
mov esi, ecx
push edi
lea eax, [esp + 0x58]
push eax
lea ecx, [esi + 0x10]
mov dword [esp + 0x44], esi
call fcn.0040abd0
lea ecx, [esp + 0x6c]
push ecx
lea ecx, [esi + 0x30]
call fcn.0040abd0
lea edx, [esp + 0x44]
push edx
lea ecx, [esi + 0x50]
call fcn.0040abd0
call dword [0x47a268]
mov edx, dword [esi + 0x7c]
mov ebp, eax
mov eax, dword [esi + 0x78]
and ebp, 0x7fffffff
mov ecx, ebp
sub ecx, eax
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
sub edx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x3c], ebp
fidiv dword [esp + 0x18]
fmul qword [0x47a780]
call fcn.0044a960
cmp eax, 0xff
mov dword [esp + 0xc], eax
jle 0x40cf00
mov eax, 0xff
mov dword [esp + 0xc], eax
mov edi, dword [esp + 0x60]
push ebx
mov ebx, 0xff
sub ebx, eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x38], edi
test eax, eax
jbe 0x40d018
xor ecx, ecx
lea edx, [edi*4]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x74]
lea esi, [ecx + eax]
lea eax, [ecx + edx]
mov edx, dword [esp + 0x4c]
add edx, ecx
xor ebp, ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], edx
test edi, edi
jbe 0x40cffd
mov edi, eax
sub edi, esi
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0x14]
sub edi, esi
lea ecx, [esi + 1]
mov esi, eax
add edx, 2
sub esi, dword [esp + 0x14]
mov dword [esp + 0x30], edi
mov dword [esp + 0x14], esi
jmp 0x40cf84
mov eax, dword [esp + 0x20]
movzx edi, byte [eax + ebp*4]
movzx eax, byte [ecx]
mov dword [esp + 0x28], eax
movzx eax, byte [ecx - 1]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x14]
movzx eax, byte [eax + edx]
mov esi, dword [esp + 0x24]
imul eax, ebx
movzx ebx, byte [ecx + 1]
imul ebx, dword [esp + 0x10]
movzx esi, byte [esi + ecx]
add eax, ebx
mov ebx, dword [esp + 0x2c]
sar eax, 8
imul esi, ebx
imul edi, ebx
mov byte [edx], al
mov eax, dword [esp + 0x28]
imul eax, dword [esp + 0x10]
add eax, esi
mov esi, dword [esp + 0x30]
sar eax, 8
mov byte [esi + ecx], al
mov eax, dword [esp + 0x34]
imul eax, dword [esp + 0x10]
add eax, edi
mov edi, dword [esp + 0x38]
sar eax, 8
mov byte [edx - 2], al
inc ebp
add ecx, 4
add edx, 4
cmp ebp, edi
jb 0x40cf80
mov ecx, dword [esp + 0x18]
add ecx, dword [esp + 0x3c]
sub dword [esp + 0x1c], 1
mov dword [esp + 0x18], ecx
jne 0x40cf35
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov ecx, dword [esi]
push ecx
call dword [0x47a224]
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x50]
push 0xcc0020
push 0
push 0
push edx
mov edi, eax
mov eax, dword [esp + 0x64]
push eax
push ecx
push 0
push 0
push edi
call dword [0x47a038]
pop ebx
push edi
test eax, eax
jne 0x40d061
mov edx, dword [esi]
push edx
call dword [0x47a228]
pop edi
pop esi
mov eax, 2
pop ebp
add esp, 0x74
ret
mov eax, dword [esi]
push eax
call dword [0x47a228]
cmp ebp, dword [esi + 0x7c]
jle 0x40d083
push 0
push 1
mov ecx, esi
call fcn.0040c750
test eax, eax
mov eax, 2
je 0x40d088
mov eax, 1
pop edi
pop esi
pop ebp
add esp, 0x74
ret
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov ebx, ecx
lea eax, [esp + 0x14]
push eax
lea ecx, [ebx + 0x10]
call fcn.0040abd0
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [ebx + 0x30]
call fcn.0040abd0
lea edx, [esp + 0x28]
push edx
lea ecx, [ebx + 0x50]
call fcn.0040abd0
call dword [0x47a268]
mov esi, eax
and esi, 0x7fffffff
cmp esi, dword [ebx + 0x7c]
jle 0x40d145
mov eax, dword [ebx]
push eax
call dword [0x47a224]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
push 0xcc0020
push 0
push 0
push ecx
push edx
mov esi, eax
mov eax, dword [esp + 0x30]
push eax
push 0
push 0
push esi
call dword [0x47a038]
push esi
test eax, eax
jne 0x40d11c
mov ecx, dword [ebx]
push ecx
call dword [0x47a228]
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x40
ret
mov edx, dword [ebx]
push edx
call dword [0x47a228]
push 0
push 1
mov ecx, ebx
call fcn.0040c750
test eax, eax
jne 0x40d29f
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x40
ret
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
mov ebp, dword [0x47a038]
push 0xcc0020
push 0
push 0
push eax
mov eax, dword [esp + 0x38]
push ecx
push edx
push 0
push 0
push eax
call ebp
test eax, eax
je 0x40d10f
mov eax, dword [ebx + 0x78]
mov ecx, dword [ebx + 0x7c]
sub esi, eax
mov dword [esp + 0x10], esi
fild dword [esp + 0x10]
sub ecx, eax
mov dword [esp + 0x10], ecx
mov edi, dword [esp + 0x1c]
fidiv dword [esp + 0x10]
lea edx, [edi + 0x100]
fmul qword [0x47a780]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
test edx, edx
jge 0x40d1b6
fadd dword [0x47a788]
fmul qword [0x47a858]
fmulp st(1)
call fcn.0044a960
cdq
and edx, 0xf
add eax, edx
mov esi, eax
sar esi, 4
sub esi, 0x10
mov eax, esi
shl eax, 4
cmp eax, edi
jge 0x40d205
test eax, eax
jl 0x40d205
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
push 0xcc0020
push 0
push 0
push ecx
push edx
push eax
mov eax, dword [esp + 0x40]
push 0
push 0
push eax
call ebp
test eax, eax
je 0x40d10f
xor edi, edi
shl esi, 4
lea ebx, [ebx]
mov eax, esi
sub eax, edi
add eax, 0x10
cmp esi, dword [esp + 0x1c]
jge 0x40d248
test esi, esi
jl 0x40d248
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
push 0xcc0020
push 0
push esi
push ecx
push edx
sub eax, esi
push eax
mov eax, dword [esp + 0x40]
push 0
push esi
push eax
call ebp
test eax, eax
je 0x40d10f
inc edi
add esi, 0x10
cmp edi, 0x10
jl 0x40d210
mov ecx, dword [ebx]
push ecx
call dword [0x47a224]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
push 0xcc0020
push 0
push 0
push edx
mov esi, eax
mov eax, dword [esp + 0x44]
push eax
push ecx
push 0
push 0
push esi
call ebp
push esi
test eax, eax
jne 0x40d296
mov edx, dword [ebx]
push edx
call dword [0x47a228]
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x40
ret
mov eax, dword [ebx]
push eax
call dword [0x47a228]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40
ret
sub esp, 0x54
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, 1
or ebx, 0xffffffff
lea edi, [esi + 0x50]
push 0
mov ecx, edi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], eax
call fcn.0040ac00
push 0x258
push 0x320
push 0
push 0
lea eax, [esp + 0x20]
push eax
call dword [0x47a22c]
mov edx, dword [esi + 0x74]
mov eax, edx
and eax, 3
add eax, eax
add eax, eax
mov ecx, dword [esp + eax + 0x30]
mov eax, dword [esp + eax + 0x40]
imul ecx, edx
imul eax, edx
lea ebp, [ecx + 0x320]
lea edx, [eax + 0x258]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], edx
test ecx, ecx
jge 0x40d34c
sub dword [esp + 0x10], ecx
mov dword [esp + 0x20], 0
test eax, eax
jge 0x40d35c
sub dword [esp + 0x14], eax
mov dword [esp + 0x24], 0
cmp ebp, 0x320
jle 0x40d377
mov ecx, 0x320
sub ecx, ebp
add dword [esp + 0x18], ecx
mov dword [esp + 0x28], 0x320
cmp edx, 0x258
jle 0x40d392
mov eax, 0x258
sub eax, edx
add dword [esp + 0x1c], eax
mov dword [esp + 0x2c], 0x258
lea ecx, [esp + 0x10]
push ecx
lea edx, [esi + 0x10]
push edx
lea eax, [esp + 0x28]
push eax
mov ecx, edi
call fcn.0040ac80
test eax, eax
je 0x40d3f3
mov ecx, dword [esi]
push ecx
call dword [0x47a224]
lea edx, [esp + 0x50]
push edx
mov ecx, edi
mov ebp, eax
call fcn.0040abd0
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
push 0xcc0020
push 0
push 0
push eax
push ecx
push edx
push 0
push 0
push ebp
call dword [0x47a038]
push ebp
test eax, eax
jne 0x40d400
mov eax, dword [esi]
push eax
call dword [0x47a228]
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x54
ret
mov ecx, dword [esi]
push ecx
call dword [0x47a228]
add dword [esi + 0x74], ebx
jne 0x40d422
push 0
push 1
mov ecx, esi
call fcn.0040c750
test eax, eax
mov eax, 2
je 0x40d427
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov eax, dword [ecx + 0x70]
cmp eax, 4
ja case.default.0x40d438
jmp dword [eax*4 + 0x40d460]
jmp fcn.00407020
jmp 0x40ce50
jmp 0x40ce80
jmp 0x40d090
jmp 0x40d2b0
mov eax, 2
ret