Function at 0x40da99
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 0x40dab1
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x40dad8
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.0040fff2
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 0x40db52
mov ecx, dword [esp + 0x38]
call fcn.0040fff2
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 0x40db52
jb 0x40db2d
cmp ecx, 0x40000
ja 0x40db52
cmp byte [esi + 0xca0], 0
mov dword [esp + 0x10], ecx
jne 0x40db43
cmp byte [esi + 0xc95], 0
je 0x40db4a
mov byte [esp + 0x40], 1
jmp 0x40db52
test ecx, ecx
je 0x40dbf8
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x10]
push edx
push eax
mov ecx, esi
call fcn.0040d640
mov edi, eax
test edi, edi
jne 0x40dbe3
cmp dword [esi + 0xc98], 0xffffffff
je 0x40dc01
test ebp, ebp
je 0x40daf2
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.0040fff2
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 0x40daf2
mov ecx, dword [esp + 0x38]
call fcn.004100b1
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0xc
cmp dword [esi + 0xc98], 0xffffffff
jne 0x40dc5b
cmp byte [esi + 0xca0], 0
je 0x40dc5b
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 0x40dc41
mov edx, dword [esi + 0x50]
cmp edx, dword [esi + 0x54]
lea ecx, [esi + 0x50]
jb 0x40dc3a
call fcn.0040fef4
jmp 0x40dc4e
mov al, byte [edx]
inc edx
mov dword [ecx], edx
jmp 0x40dc4e
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 0x40dc20
mov ecx, dword [esp + 0x38]
call fcn.004100b1
test eax, eax
jne 0x40dbee
cmp dword [esi + 0xc98], 0xfffffffe
je 0x40dbee
mov ecx, dword [esi + 0x74]
cmp ecx, 4
ja 0x40dc93
add ecx, ecx
add ecx, ecx
mov edx, 0x20
sub edx, dword [esi + 0x48]
add ecx, ecx
cmp edx, ecx
jae 0x40dbee
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret 0xc