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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b5640
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x4e54c0]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x4e54c0]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebx, ecx
mov esi, dword [ebp + 8]
xor eax, eax
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x4c], 7
mov dword [esp + 0x48], 0
mov word [esp + 0x38], ax
mov dword [esp + 0x78], eax
push 1
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push ecx
push eax
mov ecx, edi
call fcn.004021e0
cmp eax, 0xffffffff
je 0x40a902
push eax
push 0
lea eax, [esp + 0x58]
mov ecx, edi
push eax
call fcn.0040b290
mov edi, eax
lea eax, [esp + 0x38]
cmp eax, edi
je 0x40a8eb
cmp dword [esp + 0x4c], 8
jb 0x40a8ca
push dword [esp + 0x38]
call fcn.0048fa72
add esp, 4
xor eax, eax
mov dword [esp + 0x4c], 7
push edi
lea ecx, [esp + 0x3c]
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], ax
call fcn.0040b610
cmp dword [esp + 0x64], 8
jb 0x40a8fe
push dword [esp + 0x50]
call fcn.0048fa72
add esp, 4
lea edi, [esp + 0x38]
push 1
push 0x4d1cc0
mov dword [esp + 0x80], 0
mov ecx, ebx
push dword [ebx + 0x10]
push 0
call fcn.0040b860
push 0xffffffffffffffff
push 0
test eax, eax
jne 0x40a974
mov dword [esi + 0x14], 7
mov ecx, esi
mov dword [esi + 0x10], eax
push edi
mov word [esi], ax
call fcn.004033d0
push 1
push ecx
lea eax, [esp + 0x1c]
mov byte [esp + 0x80], 4
push eax
mov ecx, esi
mov dword [esp + 0x20], 0
call fcn.004021e0
cmp eax, 0xffffffff
je 0x40aa86
push 0xffffffffffffffff
push eax
mov ecx, esi
call fcn.00403320
jmp 0x40aa86
xor eax, eax
mov dword [esp + 0x3c], 7
push ebx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x3c], 0
mov word [esp + 0x2c], ax
call fcn.004033d0
push 1
push ecx
lea eax, [esp + 0x1c]
mov byte [esp + 0x80], 5
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], 0
call fcn.004021e0
cmp eax, 0xffffffff
je 0x40a9c7
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x28]
call fcn.00403320
lea ecx, [esp + 0x20]
mov byte [esp + 0x78], 6
call fcn.0040ad40
cmp dword [edi + 0x10], 0
jbe 0x40aa2c
mov ebx, dword [esp + 0x30]
test ebx, ebx
je 0x40aa2c
cmp dword [esp + 0x34], 8
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
movzx ecx, word [eax + ebx*2 - 2]
xor eax, eax
jmp 0x40aa00
cmp cx, word [eax + 0x4d1ccc]
je 0x40aa2c
add eax, 2
cmp eax, 4
jb 0x40aa00
lea ecx, [esp + 0x20]
call fcn.00409900
inc eax
cmp eax, ebx
je 0x40aa2c
push 0x5c
push 1
lea ecx, [esp + 0x28]
call fcn.0040b120
push 0xffffffffffffffff
push 0
push edi
lea ecx, [esp + 0x2c]
call fcn.0040b670
xor eax, eax
mov dword [esi + 0x14], 7
push 0xffffffffffffffff
mov dword [esi + 0x10], 0
mov ecx, esi
push eax
mov word [esi], ax
lea eax, [esp + 0x28]
push eax
call fcn.004033d0
cmp dword [esp + 0x34], 8
jb 0x40aa6f
push dword [esp + 0x20]
call fcn.0048fa72
add esp, 4
xor eax, eax
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], 0
mov word [esp + 0x20], ax
cmp dword [esp + 0x4c], 8
jb 0x40aa99
push dword [esp + 0x38]
call fcn.0048fa72
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.004906bc
mov esp, ebp
pop ebp
ret 8