Function at 0x4158b0
Capabilities:
Check if file exists
Get common file path
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1050
call fcn.0045ef30
mov eax, dword [0x6102d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
lea eax, [ebp - 0x824]
mov dword [ebp - 0x1048], ecx
push 0
push eax
call fcn.0056f980
push 0x208
lea eax, [ebp - 0xc34]
push 0
push eax
call fcn.0056f980
push 0x208
lea eax, [ebp - 0xa2c]
push 0
push eax
call fcn.0056f980
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.0056f980
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.0056f980
push 0x208
lea eax, [ebp - 0x1044]
push 0
push eax
call fcn.0056f980
add esp, 0x48
lea eax, [ebp - 0x824]
push 0
push 0x2b
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x824]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x415961
mov eax, dword [0x5a1724]
lea edx, [ebp - 0x824]
mov dword [edi], eax
add edx, 0xfffffffe
nop dword [eax]
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x415980
mov esi, dword [0x5a1790]
lea edi, [ebp - 0x824]
mov ebx, dword [0x5a1794]
add edi, 0xfffffffe
mov ecx, dword [0x5a1798]
mov dword [edx], esi
mov dword [edx + 4], ebx
mov dword [edx + 8], ecx
mov ecx, dword [0x5a179c]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x5a17a0]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x4159c1
lea ecx, [ebp - 0x824]
mov dword [edi], eax
add ecx, 0xfffffffe
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4159e0
mov eax, dword [0x5a1798]
mov dword [ecx], esi
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov eax, dword [0x5a179c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x5a17a0]
mov dword [ecx + 0x10], eax
lea ecx, [ebp - 0x824]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x415a12
mov eax, dword [str..ini]
mov dword [ecx], eax
mov eax, dword [0x5a17a8]
mov dword [ecx + 4], eax
mov ax, word [0x5a17ac]
mov word [ecx + 8], ax
lea eax, [ebp - 0x824]
push eax
push 0x104
lea eax, [ebp - 0xc34]
push eax
push 0x5a178c
push 0x5a18c0
push str.MainConfig
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xc34]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x415a61
lea esi, [ebp - 0x414]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x415a82
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
sub esi, ecx
sar esi, 1
test esi, esi
jle 0x415b80
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x415aa1
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x415b80
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.0056f980
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x415ae2
lea ecx, [ebp - 0x61c]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x415b03
mov eax, dword [str.GameBox.exe]
mov dword [ecx], eax
mov eax, dword [0x5a1764]
mov dword [ecx + 4], eax
mov eax, dword [0x5a1768]
mov dword [ecx + 8], eax
mov eax, dword [0x5a176c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x5a1770]
mov dword [ecx + 0x10], eax
mov eax, dword [0x5a1774]
mov dword [ecx + 0x14], eax
lea eax, [ebp - 0x61c]
push eax
call ebx
test eax, eax
je 0x415b80
push esi
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
push eax
lea ecx, [esi + 0x44]
call fcn.00411630
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415b70
jmp 0x41605b
push 0x1f4
lea eax, [ebp - 0xe28]
push 0
push eax
call fcn.0056f980
movups xmm0, xmmword [0x5a18f0]
mov eax, dword [0x5a1900]
lea ecx, [ebp - 0xe3c]
add esp, 0xc
mov dword [ebp - 0xe2c], eax
movups xmmword [ebp - 0xe3c], xmm0
add ecx, 0xfffffffe
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x415bc0
mov eax, dword [0x5a1790]
mov dword [ecx], eax
mov eax, dword [0x5a1794]
mov dword [ecx + 4], eax
mov eax, dword [0x5a1798]
mov dword [ecx + 8], eax
mov eax, dword [0x5a179c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x5a17a0]
mov dword [ecx + 0x10], eax
lea eax, [ebp - 0x104c]
push eax
push 0x20019
push 0
lea eax, [ebp - 0xe3c]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x415d70
lea eax, [ebp - 0x1050]
mov dword [ebp - 0x1050], 0x208
push eax
lea eax, [ebp - 0x1044]
push eax
push 0
push 0
push 0x5a18c0
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x415d70
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x1044]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x415c52
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x415c70
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x415d70
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.0056f980
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x415cb1
lea ecx, [ebp - 0x61c]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x415cd2
mov eax, dword [str.GameBox.exe]
mov dword [ecx], eax
mov eax, dword [0x5a1764]
mov dword [ecx + 4], eax
mov eax, dword [0x5a1768]
mov dword [ecx + 8], eax
mov eax, dword [0x5a176c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x5a1770]
mov dword [ecx + 0x10], eax
mov eax, dword [0x5a1774]
mov dword [ecx + 0x14], eax
lea eax, [ebp - 0x61c]
push eax
call ebx
test eax, eax
je 0x415d70
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415d30
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00411630
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415d60
jmp 0x41605b
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0x26
lea eax, [ebp - 0xa2c]
push eax
push 0
call fcn.0044b02c
lea edi, [ebp - 0xa2c]
add esp, 0x10
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x415da0
mov eax, dword [0x5a1724]
lea edx, [ebp - 0xa2c]
mov dword [edi], eax
add edx, 0xfffffffe
nop dword [eax]
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x415dc0
mov ecx, dword [0x5a1790]
lea edi, [ebp - 0xa2c]
mov dword [edx], ecx
add edi, 0xfffffffe
mov ecx, dword [0x5a1794]
mov dword [edx + 4], ecx
mov ecx, dword [0x5a1798]
mov dword [edx + 8], ecx
mov ecx, dword [0x5a179c]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x5a17a0]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x415e01
mov dword [edi], eax
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xa2c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x415e11
xor ecx, ecx
nop dword [eax + eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x415e30
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x415f21
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.0056f980
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x415e71
lea ecx, [ebp - 0x61c]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x415e92
mov eax, dword [str.GameBox.exe]
mov dword [ecx], eax
mov eax, dword [0x5a1764]
mov dword [ecx + 4], eax
mov eax, dword [0x5a1768]
mov dword [ecx + 8], eax
mov eax, dword [0x5a176c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x5a1770]
mov dword [ecx + 0x10], eax
mov eax, dword [0x5a1774]
mov dword [ecx + 0x14], eax
lea eax, [ebp - 0x61c]
push eax
call ebx
test eax, eax
je 0x415f21
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415ee3
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00411630
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415f11
jmp 0x41605b
lea ecx, [ebp - 0xc34]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415f30
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x415fe0
lea eax, [ebp - 0xc34]
push eax
call ebx
test eax, eax
je 0x415fe0
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0xc34]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x415f60
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x415f80
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415fa1
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00411630
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415fd0
jmp 0x41605b
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xa2c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x415fe2
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x416000
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x416021
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00411630
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x416050
sub ecx, edx
lea eax, [ebp - 0x20c]
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x74]
call fcn.00411630
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045ef18
mov esp, ebp
pop ebp
ret