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

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, ecx
cmp byte [esi + 0xc96], 0
push edi
mov dword [esi + 0x24], eax
je 0x40ec71
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x40ec98
mov eax, dword [esi + 0x50]
sub eax, dword [esi + 0x58]
mov ecx, 0x20
sub ecx, dword [esi + 0x48]
cdq
xor edi, edi
shr ecx, 3
sub eax, ecx
sbb edx, edi
add eax, dword [esi + 0x74]
adc edx, edi
add eax, dword [esi + 0x60]
adc edx, dword [esi + 0x64]
mov dword [esp + 0x18], edx
lea ecx, [esi + 0x10]
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], ecx
call fcn.00415f70
mov ebp, dword [esp + 0x40]
mov ebx, eax
mov dword [esp + 0x20], edx
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x10], 0x40000
mov byte [esp + 0x40], 0
test edi, edi
je 0x40ed12
mov ecx, dword [esp + 0x38]
call fcn.00415f70
mov ecx, dword [edi]
mov edi, dword [edi + 4]
add ecx, ebx
adc edi, dword [esp + 0x20]
sub ecx, eax
sbb edi, edx
test edi, edi
ja 0x40ed12
jb 0x40eced
cmp ecx, 0x40000
ja 0x40ed12
cmp byte [esi + 0xca0], 0
mov dword [esp + 0x10], ecx
jne 0x40ed03
cmp byte [esi + 0xc95], 0
je 0x40ed0a
mov byte [esp + 0x40], 1
jmp 0x40ed12
test ecx, ecx
je 0x40edb8
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x10]
push edx
push eax
mov ecx, esi
call fcn.0040e800
mov edi, eax
test edi, edi
jne 0x40eda3
cmp dword [esi + 0xc98], 0xffffffff
je 0x40edc1
test ebp, ebp
je 0x40ecb2
mov eax, dword [esi + 0x50]
sub eax, dword [esi + 0x58]
mov ecx, 0x20
sub ecx, dword [esi + 0x48]
cdq
shr ecx, 3
sub eax, ecx
mov ecx, dword [esp + 0x38]
sbb edx, edi
add eax, dword [esi + 0x74]
adc edx, edi
add eax, dword [esi + 0x60]
adc edx, dword [esi + 0x64]
sub eax, dword [esp + 0x14]
sbb edx, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edx
call fcn.00415f70
sub eax, ebx
sbb edx, dword [esp + 0x20]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x2c], edx
mov edx, dword [ebp]
mov edx, dword [edx + 0xc]
lea ecx, [esp + 0x30]
push ecx
push ebp
call edx
mov edi, eax
test edi, edi
je 0x40ecb2
mov ecx, dword [esp + 0x38]
call fcn.0041602f
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0xc
cmp dword [esi + 0xc98], 0xffffffff
jne 0x40ee1b
cmp byte [esi + 0xca0], 0
je 0x40ee1b
mov eax, dword [esi + 0x48]
mov ecx, eax
neg ecx
and ecx, 7
shr dword [esi + 0x78], cl
add eax, ecx
mov dword [esi + 0x48], eax
xor edi, edi
mov edi, edi
mov ecx, dword [esi + 0x48]
cmp ecx, 0x20
jne 0x40ee01
mov edx, dword [esi + 0x50]
cmp edx, dword [esi + 0x54]
lea ecx, [esi + 0x50]
jb 0x40edfa
call fcn.00415e72
jmp 0x40ee0e
mov al, byte [edx]
inc edx
mov dword [ecx], edx
jmp 0x40ee0e
mov al, byte [esi + 0x78]
add ecx, 8
shr dword [esi + 0x78], 8
mov dword [esi + 0x48], ecx
mov byte [esi + edi + 0xca1], al
inc edi
cmp edi, 4
jb 0x40ede0
mov ecx, dword [esp + 0x38]
call fcn.0041602f
test eax, eax
jne 0x40edae
cmp dword [esi + 0xc98], 0xfffffffe
je 0x40edae
mov ecx, dword [esi + 0x74]
cmp ecx, 4
ja 0x40ee53
add ecx, ecx
add ecx, ecx
mov edx, 0x20
sub edx, dword [esi + 0x48]
add ecx, ecx
cmp edx, ecx
jae 0x40edae
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret 0xc