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

Disassembly:
push 0xffffffffffffffff
push 0x43e8dc
mov eax, dword fs:[0]
push eax
sub esp, 0x330
mov eax, dword [0x44ede0]
xor eax, esp
mov dword [esp + 0x328], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44ede0]
xor eax, esp
push eax
lea eax, [esp + 0x344]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x354]
mov eax, dword [ebp]
xor ebx, ebx
mov esi, ecx
mov dword [esp + 0x1c], esi
cmp eax, ebx
je 0x40a5a8
push eax
call dword [0x4402b8]
push 0x12
push ebx
push ebx
push 0x445838
call dword [0x4402b4]
mov dword [ebp], eax
cmp eax, 0xffffffff
jne 0x40a5c6
xor eax, eax
jmp 0x40a90e
lea ecx, [esp + 0x58]
push ecx
push ebx
push 0x445838
push ebx
push eax
mov dword [esp + 0x6c], 0x1c
mov dword [esp + 0x2c], ebx
call dword [0x4402b0]
test eax, eax
je 0x40a8f7
mov eax, 7
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x8c], eax
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], dx
mov dword [esp + 0xa8], eax
mov dword [esp + 0xa4], ebx
mov word [esp + 0x94], cx
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc0], ebx
mov word [esp + 0xb0], dx
mov dword [esp + 0xe0], eax
mov dword [esp + 0xdc], ebx
mov word [esp + 0xcc], cx
mov dword [esp + 0xfc], eax
mov dword [esp + 0xf8], ebx
mov word [esp + 0xe8], dx
mov dword [esp + 0x118], eax
mov dword [esp + 0x114], ebx
mov word [esp + 0x104], cx
mov dword [esp + 0x134], eax
mov dword [esp + 0x130], ebx
mov word [esp + 0x120], dx
push ebx
lea eax, [esp + 0x18]
push eax
push ebx
mov dword [esp + 0x358], ebx
mov edx, dword [ebp]
mov esi, dword [0x4402ac]
push ebx
lea ecx, [esp + 0x68]
push ecx
push edx
mov dword [esp + 0x2c], ebx
call esi
mov eax, dword [esp + 0x14]
push eax
call fcn.00415020
add esp, 4
mov edi, eax
mov dword [edi], 6
xor eax, eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x18]
push edx
mov edx, dword [ebp]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x1c]
push eax
push edi
lea ecx, [esp + 0x68]
push ecx
push edx
mov dword [esp + 0x54], 0x1c
call esi
test eax, eax
jne 0x40a72d
push edi
call fcn.0041502b
add esp, 4
lea esi, [esp + 0x74]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x34c], 0xffffffff
call fcn.0040a940
jmp 0x40a8cc
lea eax, [edi + 4]
mov ecx, eax
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x40a735
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x78]
call fcn.004086f0
push edi
call fcn.0041502b
add esp, 4
push 0x1fe
lea ecx, [esp + 0x142]
xor eax, eax
push ebx
push ecx
mov dword [esp + 0x20], ebx
mov word [esp + 0x148], ax
call fcn.004269c0
mov ecx, dword [ebp]
add esp, 0xc
push ebx
push 0x200
lea edx, [esp + 0x144]
push edx
lea eax, [esp + 0x48]
push eax
push ecx
call dword [0x4402a8]
test eax, eax
je 0x40a7c9
lea eax, [esp + 0x13c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40a7a6
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x140]
lea esi, [esp + 0x120]
call fcn.004086f0
mov ecx, dword [ebp]
push 0xc
lea ebx, [esp + 0x40]
lea edi, [esp + 0x24]
call fcn.0040aa50
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x98]
mov byte [esp + 0x354], 1
call fcn.00408c70
mov esi, 8
mov byte [esp + 0x34c], 0
cmp dword [esp + 0x38], esi
jb 0x40a813
mov edx, dword [esp + 0x24]
push edx
call fcn.0041502b
add esp, 4
mov ecx, dword [ebp]
push 0
lea ebx, [esp + 0x40]
lea edi, [esp + 0x24]
call fcn.0040aa50
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0xb4]
mov byte [esp + 0x354], 2
call fcn.00408c70
mov byte [esp + 0x34c], 0
cmp dword [esp + 0x38], esi
jb 0x40a858
mov eax, dword [esp + 0x24]
push eax
call fcn.0041502b
add esp, 4
mov ecx, dword [ebp]
push 0xe
lea ebx, [esp + 0x40]
lea edi, [esp + 0x24]
call fcn.0040aa50
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0xd0]
mov byte [esp + 0x354], 3
call fcn.00408c70
mov byte [esp + 0x34c], 0
cmp dword [esp + 0x38], esi
jb 0x40a89d
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0041502b
add esp, 4
mov edx, dword [esp + 0x50]
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x74]
push eax
mov dword [esp + 0x13c], edx
call fcn.0040b360
lea esi, [esp + 0x74]
mov dword [esp + 0x34c], 0xffffffff
call fcn.0040a940
xor ebx, ebx
mov eax, dword [esp + 0x18]
mov edx, dword [ebp]
lea ecx, [esp + 0x58]
push ecx
inc eax
push eax
push 0x445838
push ebx
push edx
mov dword [esp + 0x2c], eax
call dword [0x4402b0]
test eax, eax
jne 0x40a5ed
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov eax, 0x51eb851f
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, dword [esp + 0x344]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.00422f6b
add esp, 0x33c
ret 4