Function at 0x40ebd0
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 0x40ebf1
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x40ec18
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.00415f87
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 0x40ec92
mov ecx, dword [esp + 0x38]
call fcn.00415f87
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 0x40ec92
jb 0x40ec6d
cmp ecx, 0x40000
ja 0x40ec92
cmp byte [esi + 0xca0], 0
mov dword [esp + 0x10], ecx
jne 0x40ec83
cmp byte [esi + 0xc95], 0
je 0x40ec8a
mov byte [esp + 0x40], 1
jmp 0x40ec92
test ecx, ecx
je 0x40ed38
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x10]
push edx
push eax
mov ecx, esi
call fcn.0040e780
mov edi, eax
test edi, edi
jne 0x40ed23
cmp dword [esi + 0xc98], 0xffffffff
je 0x40ed41
test ebp, ebp
je 0x40ec32
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.00415f87
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 0x40ec32
mov ecx, dword [esp + 0x38]
call fcn.00416046
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0xc
cmp dword [esi + 0xc98], 0xffffffff
jne 0x40ed9b
cmp byte [esi + 0xca0], 0
je 0x40ed9b
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 0x40ed81
mov edx, dword [esi + 0x50]
cmp edx, dword [esi + 0x54]
lea ecx, [esi + 0x50]
jb 0x40ed7a
call fcn.00415ea3
jmp 0x40ed8e
mov al, byte [edx]
inc edx
mov dword [ecx], edx
jmp 0x40ed8e
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 0x40ed60
mov ecx, dword [esp + 0x38]
call fcn.00416046
test eax, eax
jne 0x40ed2e
cmp dword [esi + 0xc98], 0xfffffffe
je 0x40ed2e
mov ecx, dword [esi + 0x74]
cmp ecx, 4
ja 0x40edd3
add ecx, ecx
add ecx, ecx
mov edx, 0x20
sub edx, dword [esi + 0x48]
add ecx, ecx
cmp edx, ecx
jae 0x40ed2e
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret 0xc