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

Disassembly:
push 0xffffffffffffffff
push 0x46aefa
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push ebp
push esi
push edi
mov eax, dword [0x486668]
xor eax, esp
push eax
lea eax, [esp + 0x64]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
lea eax, [esp + 0x18]
push ebx
push eax
mov dword [esp + 0x74], 1
call fcn.0045a510
lea ecx, [esp + 0x48]
mov byte [esp + 0x74], 2
mov eax, dword [eax]
push ecx
push eax
call fcn.0045ebe0
mov byte [esp + 0x7c], 1
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a4d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x44]
cmp eax, ebx
je 0x40a4e9
mov ecx, dword [esp + 0x48]
sub ecx, eax
sar ecx, 2
jne 0x40a524
mov esi, dword [esp + 0x74]
push 0x477ce4
mov ecx, esi
call fcn.00403710
mov eax, dword [esp + 0x44]
cmp eax, ebx
je 0x40a9d8
mov edx, dword [esp + 0x74]
push edx
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x44]
push ecx
push edx
push eax
call fcn.0040d190
mov eax, dword [esp + 0x54]
push eax
jmp 0x40a9d0
call fcn.0040ce30
mov dword [esp + 0x38], eax
mov byte [eax + 0x15], 1
mov eax, dword [esp + 0x38]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x38]
mov dword [eax], eax
mov eax, dword [esp + 0x38]
mov dword [eax + 8], eax
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x6c], 3
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
cmp eax, ecx
mov esi, eax
jbe 0x40a569
call fcn.0042f182
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
cmp eax, ecx
lea edx, [esp + 0x40]
mov ebp, edx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], esi
mov dword [esp + 0x20], ecx
jbe 0x40a584
call fcn.0042f182
cmp ebp, ebx
je 0x40a590
lea ecx, [esp + 0x40]
cmp ebp, ecx
je 0x40a595
call fcn.0042f182
cmp esi, dword [esp + 0x20]
je 0x40a772
lea edx, [esp + 0x2c]
push ebx
push edx
call fcn.0040d2e0
add esp, 8
mov edi, eax
call fcn.0041af16
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
je 0x40a75e
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x24]
push ebx
push ecx
mov byte [esp + 0x74], 4
call fcn.0045a510
push ebx
mov byte [esp + 0x78], 5
mov ecx, dword [edi]
mov eax, dword [eax]
lea edx, [esp + 0x24]
push edx
push ecx
push eax
call fcn.0045e950
add esp, 0x18
test eax, eax
mov byte [esp + 0x6c], 4
mov eax, dword [esp + 0x24]
setne bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a626
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40a648
mov byte [esp + 0x6c], 3
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40a72d
mov edx, dword [esp + 0x18]
test edx, edx
jne 0x40a654
xor eax, eax
jmp 0x40a671
mov eax, edx
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a660
sub eax, esi
js 0x40a768
cmp eax, dword [edx - 8]
jg 0x40a768
mov dword [edx - 0xc], eax
mov ecx, dword [esp + 0x18]
push 3
lea edx, [esp + 0x2c]
mov byte [eax + ecx], 0
push edx
mov ecx, edi
call fcn.00407d80
push 0x477fc0
mov byte [esp + 0x70], 6
or dword [esp + 0x18], 2
push eax
call fcn.004071a0
add esp, 8
test al, al
jne 0x40a6c0
lea esi, [esp + 0x18]
call fcn.0040b9e0
test al, al
jne 0x40a6c0
xor bl, bl
jmp 0x40a6c2
mov bl, 1
mov dword [esp + 0x6c], 4
test byte [esp + 0x14], 2
je 0x40a6f6
mov eax, dword [esp + 0x28]
and dword [esp + 0x14], 0xfffffffd
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a6f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x40a62a
push edi
lea ecx, [esp + 0x38]
call fcn.0040bbe0
lea ecx, [esp + 0x18]
push ecx
mov ecx, eax
call fcn.0040bfc0
mov byte [esp + 0x6c], 3
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a739
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebp, ebp
jne 0x40a742
call fcn.0042f182
mov esi, dword [esp + 0x30]
cmp esi, dword [ebp + 8]
jb 0x40a750
call fcn.0042f182
add esi, 4
mov dword [esp + 0x30], esi
xor ebx, ebx
jmp 0x40a584
push 0x80004005
call fcn.00402b50
push 0x80070057
call fcn.00402b50
cmp dword [esp + 0x3c], ebx
jne 0x40a7a6
mov esi, dword [esp + 0x74]
push 0x477ce4
mov ecx, esi
call fcn.00403710
or dword [esp + 0x14], 1
lea eax, [esp + 0x34]
mov byte [esp + 0x6c], 1
call fcn.0040c390
mov eax, dword [esp + 0x44]
cmp eax, ebx
jmp 0x40a9b4
mov eax, dword [esp + 0x78]
mov eax, dword [eax]
push str.SetupValues.dat
push ecx
sub eax, 0x10
mov dword [esp + 0x30], esp
mov esi, esp
push eax
call fcn.00402cb0
lea ecx, [esp + 0x28]
add esp, 4
add eax, 0x10
push ecx
mov dword [esi], eax
call fcn.00407cc0
add esp, 0xc
mov byte [esp + 0x6c], 7
mov edx, dword [esp + 0x1c]
push 0x1001
push edx
lea ecx, [esp + 0x58]
call fcn.00420386
mov dword [esp + 0x50], vtable.cptlib::CStdioFileA.0
mov byte [esp + 0x6c], 8
mov eax, dword [esp + 0x38]
mov esi, dword [eax]
lea ecx, [esp + 0x34]
mov edi, ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
mov ebp, eax
mov bl, 0xb
test edi, edi
je 0x40a81f
lea eax, [esp + 0x34]
cmp edi, eax
je 0x40a824
call fcn.0042f182
cmp esi, ebp
je 0x40a94f
test edi, edi
jne 0x40a835
call fcn.0042f182
cmp esi, dword [edi + 4]
jne 0x40a83f
call fcn.0042f182
mov eax, dword [esi + 0xc]
push eax
lea ecx, [esp + 0x24]
call fcn.0040b7a0
lea ecx, [esp + 0x24]
push 0x477fec
push ecx
mov ecx, eax
mov byte [esp + 0x74], 9
call fcn.0040b900
add esi, 0x10
lea edx, [esp + 0x30]
push esi
push edx
mov ecx, eax
mov byte [esp + 0x7c], 0xa
call fcn.0040b840
lea ecx, [esp + 0x88]
push 0x477fe8
push ecx
mov ecx, eax
mov byte [esp + 0x84], bl
call fcn.0040b900
add esp, 0x18
mov byte [esp + 0x6c], 0xc
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x54]
call fcn.0045f040
mov byte [esp + 0x6c], bl
mov eax, dword [esp + 0x78]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a8ca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x6c], 0xa
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a8ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x6c], 9
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a914
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x6c], 8
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a939
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x2c]
call fcn.004029f0
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
jmp 0x40a813
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
push eax
call fcn.00402cb0
mov esi, dword [esp + 0x78]
or dword [esp + 0x18], 1
add eax, 0x10
add esp, 4
lea ecx, [esp + 0x50]
mov dword [esi], eax
mov byte [esp + 0x6c], 7
call fcn.0042017f
mov byte [esp + 0x6c], 3
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a9a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x34]
mov byte [esp + 0x6c], 1
call fcn.0040c390
mov eax, dword [esp + 0x44]
test eax, eax
je 0x40a9d8
mov ecx, dword [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x44]
push edx
push ecx
push eax
call fcn.0040d190
mov edx, dword [esp + 0x54]
push edx
call fcn.00413dbc
add esp, 0x14
mov eax, esi
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 8