Function at 0x4082e0
Capabilities:
Check if file exists
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x45dea3
mov eax, dword fs:[0]
push eax
sub esp, 0x204
mov eax, dword [0x4754f4]
xor eax, esp
mov dword [esp + 0x200], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4754f4]
xor eax, esp
push eax
lea eax, [esp + 0x218]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x228]
lea ebx, [ebp + 0x61c]
push ebx
mov dword [esp + 0x224], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x408365
mov dword [esp + 0x220], 0xffffffff
mov eax, dword [esp + 0x22c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4089c8
lea ecx, [esp + 0x44]
call fcn.00406800
push eax
lea ecx, [esp + 0x34]
push ecx
mov byte [esp + 0x228], 1
call fcn.00447113
add esp, 8
mov byte [esp + 0x220], 3
mov edi, dword [esp + 0x44]
test edi, edi
je 0x4083d1
push 0
lea ecx, [esp + 0x1c]
call fcn.00446cde
mov eax, dword [edi + 4]
test eax, eax
jbe 0x4083af
cmp eax, 0xffffffff
jae 0x4083af
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
not esi
lea ecx, [esp + 0x18]
and esi, edi
call fcn.00446d06
test esi, esi
je 0x4083d1
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
push ebx
lea ecx, [esp + 0x60]
push ecx
call fcn.0040db50
mov byte [esp + 0x220], 4
mov edx, dword [esp + 0x5c]
mov eax, dword [edx + 4]
mov eax, dword [esp + eax + 0x84]
xor ecx, ecx
test eax, eax
sete dl
mov byte [esp + 0x40], dl
mov edx, dword [esp + 0x34]
push edx
mov byte [esp + 0x3c], 1
mov edx, dword [esp + 0x3c]
push edx
push ecx
mov dword [esp + 0x110], ecx
mov byte [esp + 0x100], cl
mov ecx, dword [esp + 0x4c]
push ecx
push eax
lea edx, [esp + 0x104]
push edx
mov dword [esp + 0x120], 0xf
call fcn.0040fff0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov byte [esp + 0x228], 5
call fcn.00447113
mov edi, dword [esp + 0x20]
add esp, 8
test edi, edi
je 0x408498
push 0
lea ecx, [esp + 0x20]
call fcn.00446cde
mov eax, dword [edi + 4]
test eax, eax
jbe 0x408476
cmp eax, 0xffffffff
jae 0x408476
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
not esi
lea ecx, [esp + 0x1c]
and esi, edi
call fcn.00446d06
test esi, esi
je 0x408498
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov eax, dword [esp + 0xf4]
mov edi, 0x10
cmp dword [esp + 0x108], edi
jae 0x4084b4
lea eax, [esp + 0xf4]
push eax
lea ecx, [esp + 0x30]
call fcn.00402eb0
add ebp, 4
push ebp
lea ecx, [esp + 0x2c]
mov byte [esp + 0x224], 6
call fcn.00402eb0
push 0x4686a4
push 0x465af8
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x22c], 7
call fcn.0040d4f0
mov edx, dword [esp + 0x28]
push edx
push str.gamepath
lea eax, [esp + 0x34]
push eax
call fcn.0040d4f0
push 0x103
lea ecx, [esp + 0x111]
push 0
push ecx
mov byte [esp + 0x118], 0
call fcn.004314b0
add esp, 0xc
push 0x104
lea edx, [esp + 0x110]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x10c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
call fcn.00410db9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40855f
push 0x80004005
call fcn.00402d50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x220], 8
mov ecx, dword [esp + 0x22c]
push 0x465b3c
push ecx
call fcn.0042da2a
add esp, 8
test eax, eax
sete al
test al, al
je 0x40860c
lea edx, [esp + 0x10c]
push edx
lea ecx, [esp + 0x24]
call fcn.00402eb0
push str.GameInfoSelf.reg
push eax
lea eax, [esp + 0x24]
mov bl, 9
push eax
mov byte [esp + 0x22c], bl
call fcn.00402300
add esp, 0xc
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x224], 0xa
call fcn.004030c0
mov byte [esp + 0x220], bl
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 0x4085fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], 8
mov eax, dword [esp + 0x20]
jmp 0x408707
lea ecx, [esp + 0x10c]
push ecx
lea ecx, [esp + 0x38]
call fcn.00402eb0
push str.GameInfo_
push eax
lea edx, [esp + 0x44]
push edx
mov byte [esp + 0x22c], 0xb
call fcn.00402300
add esp, 0xc
lea ecx, [esp + 0x22c]
push ecx
push eax
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0x22c], 0xc
call fcn.00402240
add esp, 0xc
push str..reg
push eax
lea eax, [esp + 0x28]
mov bl, 0xd
push eax
mov byte [esp + 0x22c], bl
call fcn.00402300
add esp, 0xc
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x224], 0xe
call fcn.004030c0
mov byte [esp + 0x220], bl
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 0x4086ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], 0xc
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 0x4086d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], 0xb
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4086fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], 8
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408723
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x10c]
push ecx
lea ecx, [esp + 0x38]
call fcn.00402eb0
push str.GameInfo
push eax
lea edx, [esp + 0x2c]
push edx
mov byte [esp + 0x22c], 0xf
call fcn.00402300
add esp, 0xc
mov byte [esp + 0x220], 0x11
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
or ebp, 0xffffffff
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408779
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
cmp dword [ecx - 4], 1
jle 0x408794
mov ecx, dword [ecx - 0xc]
push ecx
lea ecx, [esp + 0x28]
call fcn.00402c00
mov ecx, dword [esp + 0x24]
call fcn.0040a550
lea ecx, [esp + 0x48]
call fcn.0041c9a1
push 0
mov bl, 0x12
mov byte [esp + 0x224], bl
mov esi, dword [esp + 0x1c]
push 0x5002
push esi
lea ecx, [esp + 0x54]
call fcn.0041c9b9
test eax, eax
jne 0x408876
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push str.RegCfg____:
push eax
call fcn.004023e0
add esp, 0xc
push str.false.__r_n
push eax
lea ecx, [esp + 0x44]
push ecx
mov byte [esp + 0x22c], 0x13
call fcn.00402300
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, ebp
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408822
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408848
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x220], 0x11
call fcn.0041cdd2
mov byte [esp + 0x220], 8
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4088b9
mov ecx, dword [esp + 0x2c]
push ecx
lea ecx, [esp + 0x4c]
call fcn.0041cbaa
lea ecx, [esp + 0x48]
call fcn.0041cd67
lea ecx, [esp + 0x48]
mov byte [esp + 0x220], 0x11
call fcn.0041cdd2
mov byte [esp + 0x220], 8
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, ebp
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4088c5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov edx, ebp
lea ecx, [eax + 0xc]
mov byte [esp + 0x220], 7
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4088e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], 6
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov edx, ebp
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40890f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], 5
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov edx, ebp
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408936
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x220], 4
cmp dword [esp + 0x108], edi
jb 0x408957
mov ecx, dword [esp + 0xf4]
push ecx
call fcn.004103f9
add esp, 4
lea ecx, [esp + 0xb4]
mov dword [esp + 0x108], 0xf
mov dword [esp + 0x104], 0
mov byte [esp + 0xf4], 0
mov byte [esp + 0x220], 3
call fcn.0040dc70
lea edx, [esp + 0xb4]
push edx
mov dword [esp + 0xb8], vtable.std::ios_base.0
call fcn.00449f47
add esp, 4
lea ecx, [esp + 0x30]
call fcn.00406990
mov dword [esp + 0x220], ebp
mov eax, dword [esp + 0x22c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x4089d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x218]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x200]
xor ecx, esp
call fcn.0042d298
add esp, 0x210
ret 8