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

Disassembly:
push 0xffffffffffffffff
push 0x545526
mov eax, dword fs:[0]
push eax
sub esp, 0xf8
mov eax, dword [0x591d64]
xor eax, esp
mov dword [esp + 0xf4], eax
push ebp
push esi
push edi
mov eax, dword [0x591d64]
xor eax, esp
push eax
lea eax, [esp + 0x108]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x110], 1
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x406391
push 0x80004005
call fcn.0040e230
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
mov byte [esp + 0x110], 2
mov ecx, dword [esp + 0x118]
push ecx
lea edx, [esp + 0x2c]
push str._sGameInfo_reg.cfg
push edx
call fcn.0040de30
mov ebp, dword [esp + 0x34]
add esp, 0xc
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x406721
mov eax, dword [esp + 0x11c]
cmp dword [eax - 0xc], 0
je 0x406721
lea ecx, [esp + 0x3c]
call fcn.00401990
push eax
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x118], 3
call fcn.00523299
add esp, 8
lea ecx, [esp + 0x3c]
mov byte [esp + 0x110], 5
call fcn.00401b20
push ebp
lea edx, [esp + 0x58]
push edx
call fcn.0040abf0
mov byte [esp + 0x110], 6
mov eax, dword [esp + 0x54]
mov edx, dword [eax + 4]
mov eax, dword [esp + edx + 0x7c]
xor ecx, ecx
test eax, eax
sete dl
mov byte [esp + 0x38], dl
mov edx, dword [esp + 0x2c]
push edx
mov byte [esp + 0x34], 1
mov edx, dword [esp + 0x34]
push edx
push ecx
mov dword [esp + 0x108], ecx
mov byte [esp + 0xf8], cl
mov ecx, dword [esp + 0x44]
push ecx
push eax
lea edx, [esp + 0xfc]
push edx
mov dword [esp + 0x118], 0xf
call fcn.0040d070
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x18]
push ecx
mov byte [esp + 0x118], 7
call fcn.00523299
add esp, 8
lea ecx, [esp + 0x14]
call fcn.00401b20
mov eax, dword [esp + 0x118]
add eax, 0xfffffff0
push eax
call fcn.0040e260
add eax, 0x10
add esp, 4
mov dword [esp + 0x18], eax
push 0x56f0e8
push 0x56f0ec
lea ecx, [esp + 0x20]
mov byte [esp + 0x118], 8
call fcn.0040a2d0
cmp dword [esp + 0x100], 0x10
mov eax, dword [esp + 0xec]
jae 0x4064ec
lea eax, [esp + 0xec]
push eax
lea ecx, [esp + 0x20]
call fcn.0040d8a0
mov byte [esp + 0x110], 9
mov edx, dword [esp + 0x18]
push edx
push str.gamepath
lea ecx, [esp + 0x24]
call fcn.0040a2d0
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40652b
push 0x80004005
call fcn.0040e230
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x110], 0xa
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40655d
push 0x80004005
call fcn.0040e230
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x110], 0xb
mov ecx, dword [esi + 0xe8]
push ecx
lea edx, [esp + 0x24]
push str._sGameInfo
push edx
call fcn.0040de30
mov esi, dword [esp + 0x2c]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
add esp, 0xc
or eax, ecx
jge 0x4065b8
push 0x104
lea ecx, [esp + 0x24]
call fcn.0040e0f0
mov esi, dword [esp + 0x20]
mov ecx, esi
call fcn.0040a1f0
mov eax, dword [esp + 0x11c]
push eax
push esi
lea ecx, [esp + 0x1c]
push str._s_s.reg
push ecx
call fcn.0040de30
add esp, 0x10
lea ecx, [esp + 0x40]
call fcn.0041845a
push 0
mov byte [esp + 0x114], 0xc
mov edi, dword [esp + 0x18]
push 0x5002
push edi
lea ecx, [esp + 0x4c]
call fcn.00418472
test eax, eax
jne 0x4067c9
lea ecx, [esp + 0x40]
mov byte [esp + 0x110], 0xb
call fcn.0041889d
lea eax, [esi - 0x10]
mov byte [esp + 0x110], 0xa
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40663d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x110], 9
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406661
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x110], 8
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 0x406689
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x110], 7
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
jg 0x4066b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x100], 0x10
jb 0x4066cb
mov ecx, dword [esp + 0xec]
push ecx
call fcn.0041264d
add esp, 4
lea ecx, [esp + 0xac]
mov dword [esp + 0x100], 0xf
mov dword [esp + 0xfc], 0
mov byte [esp + 0xec], 0
mov byte [esp + 0x110], 5
call fcn.0040ad10
lea edx, [esp + 0xac]
push edx
mov dword [esp + 0xb0], vtable.std::ios_base.0
call fcn.005260ce
add esp, 4
lea ecx, [esp + 0x24]
call fcn.00401b20
lea eax, [ebp - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x110], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406745
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x110], 0
mov eax, dword [esp + 0x118]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406770
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x110], 0xffffffff
mov eax, dword [esp + 0x11c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40679e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x108]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.005043e7
add esp, 0x104
ret 8
mov ecx, dword [esp + 0x1c]
push ecx
lea ecx, [esp + 0x44]
call fcn.00418664
lea ecx, [esp + 0x40]
call fcn.00418821
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x30]
push str.Msg:convert_succeed_
push eax
call fcn.0040d960
add esp, 0xc
push 0x56ece8
push eax
lea ecx, [esp + 0x3c]
push ecx
mov byte [esp + 0x11c], 0xd
call fcn.0040db20
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40683b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x110], 0xc
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406863
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x110], 0xb
call fcn.0041889d
lea eax, [esi - 0x10]
mov byte [esp + 0x110], 0xa
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406898
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x110], 9
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4068bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x110], 8
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 0x4068e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x110], 7
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
jg 0x40690c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x100], 0x10
jb 0x406926
mov ecx, dword [esp + 0xec]
push ecx
call fcn.0041264d
add esp, 4
lea ecx, [esp + 0xac]
mov dword [esp + 0x100], 0xf
mov dword [esp + 0xfc], 0
mov byte [esp + 0xec], 0
mov byte [esp + 0x110], 5
call fcn.0040ad10
lea edx, [esp + 0xac]
push edx
mov dword [esp + 0xb0], vtable.std::ios_base.0
call fcn.005260ce
add esp, 4
lea ecx, [esp + 0x24]
call fcn.00401b20
lea eax, [ebp - 0x10]
mov byte [esp + 0x110], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4069a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x110], 0
mov eax, dword [esp + 0x118]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4069cb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x110], 0xffffffff
mov eax, dword [esp + 0x11c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4069f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x4067a0