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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
push ebx
push esi
push edi
mov edi, eax
mov dword [esp + 0x10], 0
test edi, edi
jne 0x40aa14
lea eax, [edi - 0x66]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x58]
add eax, dword [edi + 0x48]
mov ecx, dword [edi + 0x5c]
mov edx, dword [edi + 0x10]
adc ecx, dword [edi + 0x4c]
mov esi, dword [edi + 0x30]
test edx, edx
je 0x40aa3a
push 0
push ecx
push eax
mov eax, dword [edi + 0x1c]
push esi
push eax
call edx
add esp, 0x14
jmp 0x40aa53
xor edx, edx
cmp eax, eax
jne 0x40aa57
cmp edx, ecx
jne 0x40aa57
mov ecx, dword [edi + 0x1c]
push edx
mov edx, dword [edi + 0x28]
push eax
push esi
push ecx
call edx
add esp, 0x10
test eax, eax
je 0x40aa60
or esi, 0xffffffff
mov dword [esp + 0x10], esi
jmp 0x40aa95
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x1c]
push eax
mov esi, edi
call fcn.00409a20
add esp, 4
test eax, eax
je 0x40aa80
mov dword [esp + 0x10], 0xffffffff
jmp 0x40aa92
cmp dword [esp + 0x1c], 0x2014b50
je 0x40aa92
mov dword [esp + 0x10], 0xffffff99
or esi, 0xffffffff
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x30]
push ecx
call fcn.00409980
add esp, 4
test eax, eax
je 0x40aaad
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x34]
push edx
call fcn.00409980
add esp, 4
test eax, eax
je 0x40aac5
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x38]
push eax
call fcn.00409980
add esp, 4
test eax, eax
je 0x40aadd
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x3c]
push ecx
call fcn.00409980
add esp, 4
test eax, eax
je 0x40aaf5
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x40]
push edx
mov esi, edi
call fcn.00409a20
add esp, 4
test eax, eax
je 0x40ab13
mov dword [esp + 0x10], 0xffffffff
mov ecx, dword [esp + 0x40]
xor edx, edx
mov esi, ecx
mov eax, edx
shrd esi, eax, 0x10
mov ebx, esi
shr eax, 0x10
mov dword [esp + 0x28], esi
and ebx, 0x1f
mov dword [esp + 0x7c], ebx
mov ebx, eax
shrd esi, ebx, 5
and esi, 0xf
dec esi
mov dword [esp + 0x80], esi
mov esi, dword [esp + 0x28]
shrd esi, eax, 9
and esi, 0x7f
shr eax, 9
add esi, 0x7bc
mov dword [esp + 0x84], esi
mov eax, ecx
mov esi, edx
shrd eax, esi, 0xb
and eax, 0x1f
mov dword [esp + 0x78], eax
mov eax, ecx
and ecx, 0x1f
shrd eax, edx, 5
add ecx, ecx
mov dword [esp + 0x70], ecx
lea ecx, [esp + 0x44]
and eax, 0x3f
shr ebx, 5
mov ebx, dword [edi + 0x30]
shr esi, 0xb
push ecx
mov esi, edi
shr edx, 5
mov dword [esp + 0x78], eax
call fcn.00409a20
add esp, 4
test eax, eax
je 0x40aba9
mov dword [esp + 0x10], 0xffffffff
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x14]
push edx
call fcn.00409a20
add esp, 4
test eax, eax
je 0x40abc5
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x14]
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], 0
call fcn.00409a20
add esp, 4
test eax, eax
je 0x40abf1
mov dword [esp + 0x10], 0xffffffff
mov edx, dword [esp + 0x14]
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x58]
push eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], 0
call fcn.00409980
add esp, 4
or esi, 0xffffffff
test eax, eax
je 0x40ac1c
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x5c]
push ecx
call fcn.00409980
add esp, 4
test eax, eax
je 0x40ac34
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x60]
push edx
call fcn.00409980
add esp, 4
test eax, eax
je 0x40ac4c
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x64]
push eax
call fcn.00409980
add esp, 4
test eax, eax
je 0x40ac64
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x68]
push ecx
call fcn.00409980
add esp, 4
test eax, eax
je 0x40ac7c
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x6c]
push edx
mov esi, edi
call fcn.00409a20
add esp, 4
test eax, eax
je 0x40ac9a
mov dword [esp + 0x10], 0xffffffff
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x14]
push eax
call fcn.00409a20
add esp, 4
test eax, eax
je 0x40acb6
mov dword [esp + 0x10], 0xffffffff
cmp dword [esp + 0x10], 0
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x58]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x14], esi
jne 0x40adad
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40ad28
mov ecx, dword [ebp + 0x14]
cmp esi, ecx
jae 0x40acef
mov byte [esi + eax], 0
mov ebx, esi
jmp 0x40acf1
mov ebx, ecx
test esi, esi
je 0x40ad17
test ecx, ecx
je 0x40ad17
mov edx, dword [edi + 0x30]
mov ecx, dword [edi + 4]
push ebx
push eax
mov eax, dword [edi + 0x1c]
push edx
push eax
call ecx
add esp, 0x10
cmp eax, ebx
je 0x40ad17
mov dword [esp + 0x10], 0xffffffff
sub esi, ebx
cmp dword [esp + 0x10], 0
mov dword [esp + 0x14], esi
jne 0x40adad
cmp dword [ebp + 0x18], 0
je 0x40adad
mov edx, dword [esp + 0x5c]
mov ebx, edx
cmp edx, dword [ebp + 0x1c]
jb 0x40ad3c
mov ebx, dword [ebp + 0x1c]
cmp dword [esp + 0x14], 0
je 0x40ad6e
mov eax, dword [esp + 0x14]
mov esi, dword [edi + 0x30]
cdq
push edx
push eax
mov edx, 1
mov eax, edi
call fcn.00404a30
add esp, 8
test eax, eax
jne 0x40ad66
mov dword [esp + 0x14], eax
jmp 0x40ad6e
mov dword [esp + 0x10], 0xffffffff
mov esi, dword [esp + 0x5c]
test esi, esi
je 0x40ada5
cmp dword [ebp + 0x1c], 0
jbe 0x40ada5
mov eax, dword [ebp + 0x18]
mov ecx, dword [edi + 0x30]
mov edx, dword [edi + 0x1c]
push ebx
push eax
mov eax, dword [edi + 4]
push ecx
push edx
call eax
add esp, 0x10
xor ecx, ecx
cmp eax, ebx
jne 0x40ad9d
xor eax, eax
cmp ecx, eax
je 0x40ada5
mov dword [esp + 0x10], 0xffffffff
sub esi, ebx
add dword [esp + 0x14], esi
jmp 0x40adb5
mov ecx, dword [esp + 0x5c]
add dword [esp + 0x14], ecx
cmp dword [esp + 0x10], 0
jne 0x40b00a
cmp dword [esp + 0x5c], 0
je 0x40af56
mov edx, dword [esp + 0x5c]
sub dword [esp + 0x14], edx
mov dword [esp + 0x1c], 0
je 0x40ae08
mov eax, dword [esp + 0x14]
mov esi, dword [edi + 0x30]
cdq
push edx
push eax
mov edx, 1
mov eax, edi
call fcn.00404a30
add esp, 8
test eax, eax
jne 0x40ae00
mov dword [esp + 0x14], eax
jmp 0x40ae08
mov dword [esp + 0x10], 0xffffffff
cmp dword [esp + 0x5c], 0
jbe 0x40af4b
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x20]
push eax
call fcn.00409980
add esp, 4
or esi, 0xffffffff
test eax, eax
je 0x40ae2e
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x18]
push ecx
call fcn.00409980
add esp, 4
test eax, eax
je 0x40ae46
mov dword [esp + 0x10], esi
cmp dword [esp + 0x20], 1
mov ebx, dword [esp + 0x18]
jne 0x40aef7
cmp dword [esp + 0x50], esi
jne 0x40ae7d
cmp dword [esp + 0x54], 0
jne 0x40ae7d
mov eax, dword [edi + 0x30]
lea edx, [esp + 0x50]
push edx
push eax
mov eax, edi
call fcn.00409b30
add esp, 8
test eax, eax
je 0x40ae7d
mov dword [esp + 0x10], esi
cmp dword [esp + 0x48], esi
jne 0x40aea5
cmp dword [esp + 0x4c], 0
jne 0x40aea5
mov edx, dword [edi + 0x30]
lea ecx, [esp + 0x48]
push ecx
push edx
mov eax, edi
call fcn.00409b30
add esp, 8
test eax, eax
je 0x40aea5
mov dword [esp + 0x10], esi
cmp dword [esp + 0x28], esi
jne 0x40aecd
cmp dword [esp + 0x2c], 0
jne 0x40aecd
mov ecx, dword [edi + 0x30]
lea eax, [esp + 0x28]
push eax
push ecx
mov eax, edi
call fcn.00409b30
add esp, 8
test eax, eax
je 0x40aecd
mov dword [esp + 0x10], esi
cmp dword [esp + 0x64], esi
jne 0x40af35
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x24]
push edx
mov esi, edi
call fcn.00409a20
mov ebx, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x40af35
mov dword [esp + 0x10], 0xffffffff
jmp 0x40af35
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x30]
xor edx, edx
test eax, eax
je 0x40af13
push 1
push edx
push ebx
push ecx
mov ecx, dword [edi + 0x1c]
push ecx
call eax
add esp, 0x14
jmp 0x40af2d
xor eax, eax
cmp ebx, ebx
jne 0x40af31
cmp eax, edx
jne 0x40af31
mov edx, dword [edi + 0x1c]
mov eax, dword [edi + 0x28]
push 1
push ebx
push ecx
push edx
call eax
add esp, 0x10
test eax, eax
je 0x40af35
mov dword [esp + 0x10], esi
mov ecx, dword [esp + 0x1c]
lea eax, [ecx + ebx + 4]
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x5c]
jb 0x40ae13
cmp dword [esp + 0x10], 0
jne 0x40b00a
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x40afe4
mov ebx, dword [esp + 0x60]
mov eax, dword [ebp + 0x24]
cmp ebx, eax
jae 0x40af76
mov byte [ebx + ecx], 0
mov dword [esp + 0x1c], ebx
jmp 0x40af7a
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40afa3
mov esi, dword [edi + 0x30]
cdq
push edx
push eax
mov edx, 1
mov eax, edi
call fcn.00404a30
add esp, 8
test eax, eax
je 0x40afa3
mov dword [esp + 0x10], 0xffffffff
test ebx, ebx
je 0x40afdd
cmp dword [ebp + 0x24], 0
jbe 0x40afdd
mov esi, dword [esp + 0x1c]
mov edx, dword [ebp + 0x20]
mov eax, dword [edi + 0x30]
mov ecx, dword [edi + 0x1c]
push esi
push edx
mov edx, dword [edi + 4]
push eax
push ecx
call edx
add esp, 0x10
cmp eax, esi
je 0x40afdd
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x10], 0
jne 0x40b00a
mov edi, dword [ebp + 8]
test edi, edi
je 0x40aff6
mov ecx, 0x16
lea esi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40b00a
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret