Function at 0x43f0c0
Capabilities:
Check if file exists
Query or enumerate registry value
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x4a9740
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4cdbb4]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x20], ebx
mov eax, dword [0x4cf698]
mov edx, dword [eax + 0xc]
mov ecx, 0x4cf698
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x50], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
call fcn.004018d0
add esp, 4
mov ebp, 8
mov byte [esp + 0x4c], 1
cmp dword [eax + 0x18], ebp
jb 0x43f130
mov edx, dword [eax + 4]
jmp 0x43f133
lea edx, [eax + 4]
cmp edx, ebx
jne 0x43f13b
xor eax, eax
jmp 0x43f14f
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x43f140
sub eax, edi
sar eax, 1
push eax
lea edi, [esi + 4]
push edx
mov ecx, edi
call fcn.00403e20
mov byte [esp + 0x4c], 0
cmp dword [esp + 0x40], ebp
jb 0x43f173
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.0048668b
add esp, 4
push str.config.ini
lea edx, [esp + 0x20]
push edi
push edx
call fcn.00413780
add esp, 0xc
lea edi, [esi + 8]
push eax
mov ecx, edi
mov byte [esp + 0x50], 2
call fcn.00410d70
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f1bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi]
push eax
push ebx
push 0x4ad104
push str.Config
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileIntW]
mov dword [esi + 0xc], eax
cmp eax, 3
jbe 0x43f1f1
push 1
push 0x4ad104
push str.Config
mov ecx, esi
mov dword [esi + 0xc], 1
call fcn.0043f010
push str.False
push 0x4ad610
push str.Config
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.0043ef20
push 0x4ac8d8
push eax
call fcn.00412e50
xor edx, edx
add esp, 8
test al, al
mov eax, dword [esp + 0x1c]
setne dl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov dword [esi + 0x2c], edx
mov edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f246
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.False
push str.UseDebugPlguin
push str.Config
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.0043ef20
push 0x4ac8d8
push eax
call fcn.00412e50
xor edx, edx
add esp, 8
test al, al
mov eax, dword [esp + 0x1c]
setne dl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov dword [esi + 0x1c], edx
mov edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f29b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.False
push str.OutputDebugLog
push str.Config
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.0043ef20
push 0x4ac8d8
push eax
call fcn.00412e50
xor edx, edx
add esp, 8
test al, al
mov eax, dword [esp + 0x1c]
setne dl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov dword [esi + 0x20], edx
mov edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f2f0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x4ac8d8
push str.FirstStart
push str.Config
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.0043ef20
push 0x4ac8d8
push eax
call fcn.00412e50
xor edx, edx
add esp, 8
test al, al
mov eax, dword [esp + 0x1c]
setne dl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov dword [esi + 0x24], edx
mov edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f345
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi]
mov ebp, dword [sym.imp.KERNEL32.DLL_WritePrivateProfileStringW]
push eax
push str.False
push str.FirstStart
push str.Config
call ebp
push 0x4bc720
push str.VersionFirstStart
push str.Config
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.0043ef20
push 0x4ac9d0
push eax
call fcn.004198b0
xor edx, edx
add esp, 8
test al, al
mov eax, dword [esp + 0x1c]
setne dl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov dword [esi + 0x28], edx
mov edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f3b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [edi]
push edi
push 0x4ac9d0
push str.VersionFirstStart
push str.Config
call ebp
push ebx
push str.GamePath
push str.Config
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.0043ef20
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x50], 3
call fcn.00410d70
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x43f413
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp - 0xc]
cmp eax, ebx
je 0x43f44e
push 0x4ac928
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.00413780
mov eax, dword [eax]
add esp, 0xc
push eax
mov dword [esp + 0x24], 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x43f44e
mov bl, 1
jmp 0x43f450
xor bl, bl
test byte [esp + 0x20], 1
je 0x43f477
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 0x43f477
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x43f4c1
lea ecx, [esp + 0x14]
push ecx
mov ecx, esi
call fcn.00410d70
lea eax, [ebp - 0x10]
mov dword [esp + 0x4c], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x43f4ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
push 0x4ac928
lea ebx, [esi + 4]
lea ecx, [esp + 0x24]
push ebx
push ecx
call fcn.00413780
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x43f502
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x43f544
mov eax, dword [ebx]
push ecx
sub eax, 0x10
mov dword [esp + 0x28], esp
mov edi, esp
push eax
call fcn.00403ce0
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [edi], eax
call fcn.0042bfe0
lea eax, [ebp - 0x10]
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x43f49f
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], 0
call fcn.00403c00
lea ecx, [esp + 0x1c]
push ecx
push 0x4af748
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x43f5e0
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueW]
lea edx, [esp + 0x18]
push edx
push eax
push eax
mov eax, dword [esp + 0x28]
push eax
call edi
cmp dword [esp + 0x18], 0
jle 0x43f5a6
lea ecx, [esp + 0x18]
push ecx
push 0x400
lea ecx, [esp + 0x1c]
call fcn.00403c70
mov edx, dword [esp + 0x20]
push eax
push 0
push edx
call edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.004876e0
add esp, 8
test eax, eax
jl 0x43f5d6
cmp eax, dword [edi - 8]
jg 0x43f5d6
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x43f5e4
push 0x80070057
call fcn.004033e0
mov edi, dword [esp + 0x14]
mov ebx, 1
cmp dword [edi - 4], ebx
jle 0x43f5ff
mov eax, dword [edi - 0xc]
push eax
lea ecx, [esp + 0x18]
call fcn.00403f30
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp dword [edi - 4], ebx
jle 0x43f61c
mov ecx, dword [edi - 0xc]
push ecx
lea ecx, [esp + 0x18]
call fcn.00403f30
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.004876e0
add esp, 8
test eax, eax
jl 0x43f5d6
cmp eax, dword [edi - 8]
jg 0x43f5d6
mov dword [edi - 0xc], eax
xor edx, edx
mov word [edi + eax*2], dx
push ebx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x1c]
call fcn.00410c70
push 0x4af744
push eax
mov byte [esp + 0x54], 4
call fcn.0042d4d0
mov bl, al
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 8
mov byte [esp + 0x4c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f68b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x43f6da
mov edi, dword [edi - 0xc]
dec edi
push edi
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00420290
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x50], 5
call fcn.00410d70
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x43f6d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x14]
push 0x4ac928
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.00413780
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, eax
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 0x43f71c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
je 0x43f76a
push ecx
add edi, 0xfffffff0
mov dword [esp + 0x24], esp
mov ebp, esp
push edi
call fcn.00403ce0
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [ebp], eax
call fcn.0042bfe0
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f4ab
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x43f4ab
lea eax, [edi - 0x10]
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f78e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret