Function at 0x40a6b0
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
test edi, edi
mov dword [esp + 0x10], 0
jne 0x40a6d4
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]
test edx, edx
mov esi, dword [edi + 0x30]
je 0x40a6fa
push 0
push ecx
push eax
mov eax, dword [edi + 0x1c]
push esi
push eax
call edx
add esp, 0x14
jmp 0x40a713
xor edx, edx
cmp eax, eax
jne 0x40a717
cmp edx, ecx
jne 0x40a717
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 0x40a720
or esi, 0xffffffff
mov dword [esp + 0x10], esi
jmp 0x40a755
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x1c]
push eax
mov esi, edi
call fcn.004098a0
add esp, 4
test eax, eax
je 0x40a740
mov dword [esp + 0x10], 0xffffffff
jmp 0x40a752
cmp dword [esp + 0x1c], 0x2014b50
je 0x40a752
mov dword [esp + 0x10], 0xffffff99
or esi, 0xffffffff
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x30]
push ecx
call fcn.00409810
add esp, 4
test eax, eax
je 0x40a76d
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x34]
push edx
call fcn.00409810
add esp, 4
test eax, eax
je 0x40a785
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x38]
push eax
call fcn.00409810
add esp, 4
test eax, eax
je 0x40a79d
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x3c]
push ecx
call fcn.00409810
add esp, 4
test eax, eax
je 0x40a7b5
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x40]
push edx
mov esi, edi
call fcn.004098a0
add esp, 4
test eax, eax
je 0x40a7d3
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x40]
push 0
push eax
lea edx, [esp + 0x78]
call fcn.0040a630
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x4c]
push ecx
call fcn.004098a0
add esp, 0xc
test eax, eax
je 0x40a7ff
mov dword [esp + 0x10], 0xffffffff
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x14]
push edx
call fcn.004098a0
add esp, 4
test eax, eax
je 0x40a81b
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.004098a0
add esp, 4
test eax, eax
je 0x40a847
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.00409810
add esp, 4
or esi, 0xffffffff
test eax, eax
je 0x40a872
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x5c]
push ecx
call fcn.00409810
add esp, 4
test eax, eax
je 0x40a88a
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x60]
push edx
call fcn.00409810
add esp, 4
test eax, eax
je 0x40a8a2
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x64]
push eax
call fcn.00409810
add esp, 4
test eax, eax
je 0x40a8ba
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x68]
push ecx
call fcn.00409810
add esp, 4
test eax, eax
je 0x40a8d2
mov dword [esp + 0x10], esi
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x6c]
push edx
mov esi, edi
call fcn.004098a0
add esp, 4
test eax, eax
je 0x40a8f0
mov dword [esp + 0x10], 0xffffffff
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x14]
push eax
call fcn.004098a0
add esp, 4
test eax, eax
je 0x40a90c
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 ebx, esi
jne 0x40a96d
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40a96d
mov ecx, dword [ebp + 0x14]
cmp esi, ecx
jae 0x40a93d
mov byte [esi + eax], 0
jmp 0x40a93f
mov ebx, ecx
test esi, esi
jbe 0x40a965
test ecx, ecx
jbe 0x40a965
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 0x40a965
mov dword [esp + 0x10], 0xffffffff
sub esi, ebx
mov dword [esp + 0x14], esi
mov ebx, esi
mov eax, dword [esp + 0x5c]
add ebx, eax
cmp dword [esp + 0x10], 0
jne 0x40abda
test eax, eax
je 0x40ab24
sub ebx, eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], ebx
je 0x40a9cb
mov esi, dword [edi + 0x30]
mov eax, ebx
cdq
push edx
push eax
mov edx, 1
mov eax, edi
call fcn.0040c890
add esp, 8
test eax, eax
mov eax, dword [esp + 0x5c]
jne 0x40a9c3
mov dword [esp + 0x14], 0
mov ebx, dword [esp + 0x14]
jmp 0x40a9cb
mov dword [esp + 0x10], 0xffffffff
test eax, eax
jbe 0x40ab19
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x20]
push edx
call fcn.00409810
add esp, 4
test eax, eax
je 0x40a9ef
mov dword [esp + 0x10], 0xffffffff
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x18]
push eax
call fcn.00409810
add esp, 4
test eax, eax
je 0x40aa0b
mov dword [esp + 0x10], 0xffffffff
cmp dword [esp + 0x20], 1
mov esi, dword [esp + 0x18]
jne 0x40aabd
cmp dword [esp + 0x50], 0xffffffff
jne 0x40aa46
cmp dword [esp + 0x54], 0
jne 0x40aa46
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x50]
push ecx
mov eax, edi
call fcn.004099b0
add esp, 4
test eax, eax
je 0x40aa46
mov dword [esp + 0x10], 0xffffffff
cmp dword [esp + 0x48], 0xffffffff
jne 0x40aa72
cmp dword [esp + 0x4c], 0
jne 0x40aa72
mov ebx, dword [edi + 0x30]
lea edx, [esp + 0x48]
push edx
mov eax, edi
call fcn.004099b0
add esp, 4
test eax, eax
je 0x40aa72
mov dword [esp + 0x10], 0xffffffff
cmp dword [esp + 0x28], 0xffffffff
jne 0x40aa9e
cmp dword [esp + 0x2c], 0
jne 0x40aa9e
mov ebx, dword [edi + 0x30]
lea eax, [esp + 0x28]
push eax
mov eax, edi
call fcn.004099b0
add esp, 4
test eax, eax
je 0x40aa9e
mov dword [esp + 0x10], 0xffffffff
cmp dword [esp + 0x64], 0xffffffff
jne 0x40aaff
mov ebx, dword [edi + 0x30]
lea ecx, [esp + 0x24]
push ecx
mov esi, edi
call fcn.004098a0
mov esi, dword [esp + 0x1c]
add esp, 4
jmp 0x40aaf3
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x30]
xor edx, edx
test eax, eax
je 0x40aad9
push 1
push edx
mov edx, dword [edi + 0x1c]
push esi
push ecx
push edx
call eax
add esp, 0x14
jmp 0x40aaf3
xor eax, eax
cmp esi, esi
jne 0x40aaf7
cmp eax, edx
jne 0x40aaf7
mov eax, dword [edi + 0x1c]
push 1
push esi
push ecx
mov ecx, dword [edi + 0x28]
push eax
call ecx
add esp, 0x10
test eax, eax
je 0x40aaff
mov dword [esp + 0x10], 0xffffffff
mov edx, dword [esp + 0x1c]
lea eax, [edx + esi + 4]
cmp eax, dword [esp + 0x5c]
mov dword [esp + 0x1c], eax
jb 0x40a9d3
mov ebx, dword [esp + 0x14]
cmp dword [esp + 0x10], 0
jne 0x40abda
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x40abb4
mov eax, dword [esp + 0x60]
mov ecx, dword [ebp + 0x1c]
cmp eax, ecx
jae 0x40ab44
mov byte [eax + edx], 0
mov dword [esp + 0x1c], eax
jmp 0x40ab48
mov dword [esp + 0x1c], ecx
test ebx, ebx
je 0x40ab73
mov esi, dword [edi + 0x30]
mov eax, ebx
cdq
push edx
push eax
mov edx, 1
mov eax, edi
call fcn.0040c890
add esp, 8
test eax, eax
mov eax, dword [esp + 0x60]
je 0x40ab73
mov dword [esp + 0x10], 0xffffffff
test eax, eax
jbe 0x40abad
cmp dword [ebp + 0x1c], 0
jbe 0x40abad
mov esi, dword [esp + 0x1c]
mov eax, dword [ebp + 0x18]
mov ecx, dword [edi + 0x30]
mov edx, dword [edi + 0x1c]
push esi
push eax
mov eax, dword [edi + 4]
push ecx
push edx
call eax
add esp, 0x10
cmp eax, esi
je 0x40abad
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 0x40abda
mov edi, dword [ebp + 8]
test edi, edi
je 0x40abc6
mov ecx, 0x16
lea esi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40abda
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