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

Disassembly:
push esi
push ebx
mov esi, ecx
push edi
mov ebx, dword [esi + 0x88]
mov eax, ebx
mov ecx, dword [esi + 0x3c]
and eax, 0xffffff8b
mov dword [esi + 0x88], eax
mov edi, ebx
lea eax, [esi + 0xa8]
shr edi, 7
push eax
and edi, 1
mov dword [esi + 0x78], 0
lea eax, [esi + 0x10]
mov byte [esi + 0x7c], 0xff
push eax
mov eax, edi
mov dword [esi + 0x80], 0
or eax, 2
mov dword [esi + 0x84], 0
mov edx, dword [ecx]
and ebx, 0x8a
cmp bl, 0x8a
cmovne eax, edi
lea edi, [esi + 0x40]
push eax
mov eax, dword [edx + 0x18]
push edi
call eax
test al, al
jne 0x40a6b7
push 1
push 0
push 0
call sub.KERNEL32.dll_RaiseFailFastException
cmp dword [esi + 0xa8], 0
lea ebx, [esi + 0xa8]
je 0x40a6cd
or dword [esi + 0x88], 0x20
mov ecx, dword [esi + 0x3c]
push edi
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
mov ecx, dword [ebx]
mov dl, al
test ecx, ecx
je 0x40a6ed
test byte [esi + 0x88], 0x80
jne 0x40a8a0
mov ecx, dword [esi + 0x30]
xor bl, bl
mov dword [esi + 0xc], ecx
mov dword [esi + 0xa4], ecx
cmp ecx, 0x4081f2
je 0x40a753
cmp ecx, 0x40820c
je 0x40a753
cmp ecx, 0x40241f
je 0x40a74c
cmp ecx, 0x40239a
je 0x40a74c
cmp ecx, 0x402480
je 0x40a74c
cmp ecx, 0x4024cc
je 0x40a745
cmp ecx, 0x402592
je 0x40a745
xor eax, eax
cmp ecx, 0x4025da
mov ecx, 3
cmove eax, ecx
jmp 0x40a758
mov eax, 2
jmp 0x40a758
mov eax, 1
jmp 0x40a758
mov eax, 4
test dl, dl
je 0x40a7b5
cmp eax, 2
jne 0x40a78f
mov eax, dword [esi + 8]
mov ecx, esi
mov dword [esi + 0x90], eax
call fcn.0040a9c0
mov eax, dword [esi + 0x88]
test eax, 2
sete bl
test eax, 2
jne 0x40a8fa
jmp 0x40a83b
cmp eax, 3
je 0x40a8d0
test eax, eax
jne 0x40a8e6
test byte [esi + 0x88], 2
je 0x40a8fa
mov edi, dword [esi + 8]
jmp 0x40a84a
test eax, eax
je 0x40a8fa
cmp eax, 4
je 0x40a8f3
cmp eax, 1
jne 0x40a8e6
test byte [esi + 0x88], al
je 0x40a7e1
push eax
push 0
push 0
call sub.KERNEL32.dll_RaiseFailFastException
mov ecx, dword [esi + 0x2c]
add ecx, 0xc4
test byte [esi + 0x88], 2
lea eax, [ecx + 8]
mov dword [esi + 0x20], eax
lea eax, [ecx + 0xc]
mov dword [esi + 0x28], eax
lea eax, [ecx + 0x10]
mov dword [esi + 0x24], eax
lea eax, [ecx + 0x18]
mov dword [esi + 0x1c], eax
mov eax, dword [ecx]
mov dword [esi + 0x30], eax
mov ecx, dword [ecx + 4]
mov dword [esi + 0x2c], ecx
mov dword [esi + 0xc], eax
mov dword [esi + 0xa4], eax
je 0x40a8fa
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x40a8fa
cmp ecx, eax
jbe 0x40a8fa
mov bl, 1
push dword [esi + 0x8c]
mov ecx, esi
call fcn.0040a1f0
mov edi, eax
test edi, edi
je 0x40a8d9
mov ecx, esi
call fcn.00409fa0
cmp dword [esi + 8], edi
je 0x40a869
push 1
push 0
push 0
call sub.KERNEL32.dll_RaiseFailFastException
cmp dword [esi + 0x80], 0
je 0x40a87d
push 1
push 0
push 0
call sub.KERNEL32.dll_RaiseFailFastException
cmp dword [0x56fc94], 7
jb 0x40a645
push str.__KeepUnwinding___n
push 0
push 0x20
call fcn.00409c80
add esp, 0xc
jmp 0x40a645
cmp ecx, 0xffffffff
jne 0x40a8b8
mov dword [esi + 0xc], 0
mov dword [esi + 0xa4], 0
jmp 0x40a8fa
push 0x8a
push ecx
push dword [esi]
mov ecx, esi
call fcn.0040a410
or dword [esi + 0x88], 0x20
jmp 0x40a8fa
mov ecx, esi
call fcn.0040a9c0
jmp 0x40a8fa
test bl, bl
je 0x40a8fa
or dword [esi + 0x88], 4
jmp 0x40a8fa
push 1
push 0
push 0
call sub.KERNEL32.dll_RaiseFailFastException
jmp 0x40a8fa
mov ecx, esi
call fcn.0040aa50
mov eax, dword [esi + 0xc]
pop edi
pop ebx
test eax, eax
je 0x40a953
mov ecx, dword [esi + 0x88]
test cl, 1
je 0x40a912
dec eax
mov dword [esi + 0xc], eax
cmp dword [esi + 0x80], 0
je 0x40a93f
test cl, 2
je 0x40a93f
mov ecx, esi
call fcn.00409fa0
mov ecx, dword [esi + 0x3c]
lea eax, [esi + 0x10]
push eax
lea eax, [esi + 0x40]
push eax
mov edx, dword [ecx]
call dword [edx + 0x1c]
mov dword [esi + 0x84], eax
pop esi
ret
mov dword [esi + 0x80], 0
mov dword [esi + 0x84], 0
pop esi
ret