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

Disassembly:
push 0xffffffffffffffff
push 0x48d933
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x4e4394]
xor eax, esp
mov dword [esp + 0xc0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4e4394]
xor eax, esp
push eax
lea eax, [esp + 0xd8]
mov dword fs:[0], eax
mov esi, ecx
push esi
mov dword [esp + 0x24], esi
call fcn.0040a500
mov eax, dword [esi + 0x2d0]
imul eax, eax, 0x62
mov ebp, dword [esi + 0x2b4]
sub eax, 0x14
mov ecx, eax
mov eax, 0x1ec
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
xor ebx, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x2cc]
mov byte [esp + 0x40], bl
mov byte [esp + 0x48], bl
mov byte [esp + 0x50], bl
mov byte [esp + 0x5c], bl
mov byte [esp + 0x64], bl
mov byte [esp + 0x6c], bl
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov edi, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebp
jmp 0x40a0d0
mov eax, dword [esi + 0x2cc]
mov esi, dword [esi + 0x2b4]
mov dword [esp + 0x74], eax
cmp ebp, ebx
je 0x40a0e8
cmp ebp, esi
je 0x40a0ed
call fcn.00476736
cmp edi, dword [esp + 0x74]
je 0x40a42a
cmp ebp, ebx
jne 0x40a1b9
call fcn.00476736
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x40a110
call fcn.00476736
mov edi, dword [edi + 0xc]
mov ecx, dword [esp + 0x14]
mov eax, 1
mov dword [esp + 0x3c], ecx
mov byte [esp + 0x40], al
mov byte [esp + 0x5c], al
mov byte [esp + 0x50], al
mov byte [esp + 0x6c], al
push eax
mov dword [esp + 0x5c], 0x13b
mov dword [esp + 0x50], 0x55
mov dword [esp + 0x6c], 0xf
mov byte [esp + 0x4c], bl
mov byte [esp + 0x68], bl
mov dword [esp + 0x58], ebx
mov dword [esp + 0x3c], ebx
mov edx, dword [edi]
mov edx, dword [edx + 0xc]
lea eax, [esp + 0x3c]
push eax
mov ecx, edi
call edx
mov eax, dword [edi + 0x94]
mov dword [eax + 0x44], 0xff848282
mov esi, dword [edi]
mov edx, dword [esi + 0x10]
push ebx
lea ecx, [esp + 0xac]
push ecx
mov ecx, edi
call edx
push eax
mov eax, dword [esi + 0x60]
mov ecx, edi
call eax
cmp ebp, ebx
jne 0x40a1c1
call fcn.00476736
xor ebp, ebp
mov esi, dword [esp + 0x1c]
cmp esi, dword [ebp + 0x18]
jne 0x40a1a7
call fcn.00476736
mov eax, dword [esi + 0x10]
mov ebp, 8
cmp dword [eax + 0x18], ebp
jb 0x40a1c6
mov eax, dword [eax + 4]
jmp 0x40a1c9
mov eax, dword [ebp]
jmp 0x40a106
mov ebp, dword [ebp]
jmp 0x40a199
add eax, 4
xor ecx, ecx
mov word [esp + 0xbc], cx
mov ecx, eax
mov dword [esp + 0xd0], 7
mov dword [esp + 0xcc], ebx
lea esi, [ecx + 2]
lea ebx, [ebx]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x40a1f0
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0xbc]
call fcn.0040bf50
mov dword [esp + 0xe0], ebx
cmp dword [esp + 0xd0], ebp
mov ebp, dword [esp + 0xbc]
jae 0x40a22a
lea ebp, [esp + 0xbc]
push 4
call fcn.00475672
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40a251
mov edx, dword [0x4e7fac]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e7fac
call eax
add eax, 0x10
mov dword [esi], eax
jmp 0x40a253
xor esi, esi
mov dword [esp + 0x24], esi
cmp ebp, ebx
je 0x40a271
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40a260
sub eax, edx
sar eax, 1
mov ebx, eax
push ebp
mov eax, esi
call fcn.00419090
mov byte [esp + 0xe0], 1
mov eax, dword [edi + 0x94]
mov ebp, dword [eax + 0x30]
mov ecx, dword [esi]
mov esi, dword [ebp]
add eax, 0x30
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x40a2e1
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x40a2d6
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40a2d6
call fcn.00417cf0
mov dword [esp + 0x14], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x40a2ca
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x14]
add ecx, 0x10
mov dword [ebp], ecx
jmp 0x40a2e1
mov ebx, dword [ecx - 0xc]
push ecx
mov eax, ebp
call fcn.00419090
mov byte [esp + 0xe0], 0
mov esi, dword [esp + 0x24]
mov eax, dword [esi]
sub eax, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a30b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call fcn.00475571
mov eax, dword [edi + 0x94]
mov ecx, 1
add esp, 4
cmp dword [eax + 4], ecx
je 0x40a37a
mov dword [eax + 4], ecx
mov eax, dword [edi + 0x94]
cmp dword [eax + 4], ecx
mov ecx, dword [eax + 8]
jne 0x40a350
mov dword [eax + 8], 4
mov edx, dword [edi + 0x94]
cmp dword [edx + 8], ecx
je 0x40a37a
lea eax, [esp + 0x98]
jmp 0x40a366
mov dword [eax + 8], 0
mov edx, dword [edi + 0x94]
cmp dword [edx + 8], ecx
je 0x40a37a
lea eax, [esp + 0x78]
mov esi, dword [edi]
mov edx, dword [esi + 0x10]
push 0
push eax
mov ecx, edi
call edx
push eax
mov eax, dword [esi + 0x60]
mov ecx, edi
call eax
mov ecx, dword [esp + 0x20]
push edi
call fcn.004318df
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40a423
call fcn.00476736
xor eax, eax
mov esi, dword [esp + 0x1c]
cmp esi, dword [eax + 0x18]
jne 0x40a3a5
call fcn.00476736
mov eax, dword [esi + 0x10]
mov edx, dword [edi]
mov edx, dword [edx + 0x14]
xor ecx, ecx
cmp byte [eax + 0x54], cl
setne cl
push ecx
mov ecx, edi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
lea ecx, [esp + 0x88]
push ecx
mov ecx, edi
call edx
push eax
lea eax, [esp + 0x2c]
push eax
call dword [0x4a43b4]
mov ecx, dword [esp + 0x30]
add ecx, 0xd
mov dword [esp + 0xe0], 0xffffffff
cmp dword [esp + 0xd0], 8
mov dword [esp + 0x14], ecx
jb 0x40a407
mov edx, dword [esp + 0xbc]
push edx
call fcn.00475571
add esp, 4
lea esi, [esp + 0x18]
call fcn.00418c90
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
xor ebx, ebx
jmp 0x40a0d0
mov eax, dword [eax]
jmp 0x40a397
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.0047557c
add esp, 0xd0
ret