Function at 0x4040f0
Capabilities:
Check if file exists
Print debug messages
Query or enumerate registry value
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x545602
mov eax, dword fs:[0]
push eax
sub esp, 0x254
mov eax, dword [0x591d64]
xor eax, esp
mov dword [esp + 0x250], eax
push ebx
push esi
push edi
mov eax, dword [0x591d64]
xor eax, esp
push eax
lea eax, [esp + 0x264]
mov dword fs:[0], eax
mov eax, dword [esp + 0x274]
mov ebx, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], 0
push 0x103
lea ecx, [esp + 0x55]
push 0
mov dword [esp + 0x274], 0
push ecx
mov byte [esp + 0x5c], 0
call fcn.00507960
mov esi, dword [sym.imp.SHLWAPI.dll_SHGetValueA]
add esp, 0xc
lea edx, [esp + 0x48]
push edx
mov edx, dword [esp + 0x27c]
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x54]
push ecx
push edx
push str.SOFTWAREGoyooi8deskgidinfo
mov edi, 0x104
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x64], 1
mov dword [esp + 0x60], edi
call esi
test eax, eax
je 0x4041e6
push 0x56f8a7
mov ecx, ebx
call fcn.0040d8a0
mov dword [esp + 0x26c], 0xffffffff
mov eax, dword [esp + 0x278]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4041df
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x4049b2
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404200
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 + 0x26c], 1
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404232
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 + 0x26c], 2
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404264
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 + 0x2c], eax
push 0x3b
push 1
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x2c]
push edx
mov byte [esp + 0x27c], 3
call fcn.004183d5
push 0x3b
push 2
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.004183d5
push 0x3b
push 3
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.004183d5
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4042cf
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 + 0x24], eax
mov byte [esp + 0x26c], 4
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404301
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 + 0x26c], 5
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404333
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 + 0x10], eax
push 0x3d
mov byte [esp + 0x270], 6
mov ecx, dword [esp + 0x24]
push 1
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.004183d5
mov eax, dword [esp + 0x28]
push 0x3d
push 1
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.004183d5
mov edx, dword [esp + 0x2c]
push 0x3d
push 1
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.004183d5
mov ecx, dword [esp + 0x24]
push 0x56ef2c
push ecx
call fcn.00506154
add esp, 8
test eax, eax
jne 0x4045e9
push 0x103
push eax
lea edx, [esp + 0x161]
push edx
mov byte [esp + 0x164], al
call fcn.00507960
add esp, 0xc
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x15c]
push ecx
lea edx, [esp + 0x24]
push edx
push str.vpartition
push str.SOFTWAREGoyooi8desk
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x34], 1
mov dword [esp + 0x50], edi
call esi
test eax, eax
je 0x404403
mov esi, dword [esp + 0x44]
push 0x56f8a7
mov ecx, esi
call fcn.0040d8a0
jmp 0x404892
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40441d
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 + 0x34], eax
mov byte [esp + 0x26c], 7
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40444f
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 + 0x18], eax
mov byte [esp + 0x26c], 8
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404481
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 + 0x3c], eax
mov byte [esp + 0x26c], 9
xor esi, esi
jmp 0x4044a0
push 0x3b
push esi
lea ecx, [esp + 0x160]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.004183d5
mov eax, dword [esp + 0x34]
push 0x3a
push 0
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.004183d5
mov edx, dword [esp + 0x34]
push 0x3a
push 1
push edx
lea eax, [esp + 0x24]
push eax
call fcn.004183d5
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], 0
jl 0x40450d
mov edi, dword [esp + 0x18]
mov ecx, dword [edi - 0xc]
mov dl, byte [eax]
cmp ecx, 1
jne 0x4044fb
test ecx, ecx
jl 0x40450d
cmp byte [edi], dl
je 0x404503
inc esi
cmp esi, 8
jl 0x4044a0
jmp 0x40455e
mov ecx, dword [esp + 0x3c]
cmp dword [ecx - 0xc], 0
jge 0x404517
push 0x80070057
call fcn.0040e230
mov esi, dword [eax - 0xc]
mov bl, byte [ecx]
test esi, esi
jg 0x40452a
push 0x80070057
call fcn.0040e230
cmp dword [eax - 4], 1
jle 0x404540
mov ecx, esi
push ecx
lea ecx, [esp + 0x18]
call fcn.0040e030
mov eax, dword [esp + 0x14]
mov byte [eax], bl
test esi, esi
jl 0x40450d
mov eax, dword [esp + 0x14]
cmp esi, dword [eax - 8]
jg 0x40450d
mov dword [eax - 0xc], esi
mov edx, dword [esp + 0x14]
mov byte [esi + edx], 0
mov eax, dword [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push 0x56eb90
push eax
call fcn.0040de30
mov byte [esp + 0x278], 8
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404599
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 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 0x4045c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 6
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4045e9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
push 0x5c
push ecx
call fcn.00506452
mov ecx, dword [esp + 0x18]
add esp, 8
test eax, eax
jne 0x404605
or eax, 0xffffffff
jmp 0x404607
sub eax, ecx
mov edx, dword [ecx - 0xc]
inc eax
cmp eax, edx
jne 0x404668
dec edx
push edx
push 0
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x1c]
call fcn.0040a5b0
mov byte [esp + 0x26c], 0xa
mov esi, dword [esp + 0x1c]
push esi
lea eax, [esp + 0x14]
push 0x56eb90
push eax
call fcn.0040de30
lea eax, [esi - 0x10]
add esp, 0xc
mov byte [esp + 0x26c], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404664
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x27c], 0
jne 0x40467a
lea eax, [ecx - 0x10]
jmp 0x404880
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4047f6
mov eax, dword [esp + 0x10]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x44], esp
mov esi, esp
push eax
call fcn.0040e260
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0x274], 0xb
mov ebx, dword [esp + 0x38]
mov eax, dword [ebx + 0xe8]
lea esi, [ebx + 0xe8]
sub eax, 0x10
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.0040e260
add eax, 0x10
mov dword [edi], eax
add esp, 4
mov ecx, ebx
mov byte [esp + 0x274], 6
call fcn.00409a90
test eax, eax
je 0x4047f6
mov ecx, dword [esp + 0x10]
push ecx
push 0x56eb90
push esi
call fcn.0040de30
add esp, 0xc
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404715
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 + 0x18], eax
mov bl, 0xc
mov byte [esp + 0x26c], bl
mov ecx, dword [esi]
push ecx
lea edx, [esp + 0x1c]
push str._sGameInfoSelfConfig.ini
push edx
call fcn.0040de30
mov esi, dword [esp + 0x24]
add esp, 0xc
push esi
push 0
push str.btnCount
push str.dlg_config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x278]
push edx
mov dword [ecx + 0xec], eax
lea eax, [esp + 0x3c]
push str.Msg:assis_to_gid_succeed_
push eax
call fcn.0040d960
add esp, 0xc
push 0x56ece8
push eax
lea ecx, [esp + 0x24]
push ecx
mov byte [esp + 0x278], 0xd
call fcn.0040db20
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4047c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], bl
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4047e9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 6
lea eax, [esi - 0x10]
jmp 0x404860
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x44]
push str.Msg:assis_to_gid_false__file_not_exist_
push edx
call fcn.0040d960
add esp, 0xc
push 0x56ece8
push eax
lea eax, [esp + 0x38]
push eax
mov byte [esp + 0x278], 0xe
call fcn.0040db20
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404851
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 6
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404879
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
push eax
call fcn.0040e260
mov esi, dword [esp + 0x48]
add esp, 4
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0x26c], 5
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4048ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4048e2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 3
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 0x40490a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 2
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 0x404932
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 1
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 0x40495a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 0
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 0x404982
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x26c], 0xffffffff
mov eax, dword [esp + 0x278]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4049b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x264]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x250]
xor ecx, esp
call fcn.005043e7
add esp, 0x260
ret 0xc