Function at 0x4211a2
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push 0x89c
mov eax, 0x4f9313
call fcn.0041c61c
mov esi, ecx
mov edi, 0x208
lea eax, [ebp - 0x420]
push edi
xor ebx, ebx
push ebx
push eax
call fcn.0048faf0
push edi
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.0048faf0
add esp, 0x18
mov dword [ebp - 0x850], ebx
xor eax, eax
lea ecx, [ebp - 0x860]
mov word [ebp - 0x860], ax
push 7
pop edi
push ebx
push 0x501100
mov dword [ebp - 0x84c], edi
call fcn.004078c0
push ebx
xor eax, eax
mov dword [ebp - 4], ebx
push 0x501100
lea ecx, [ebp - 0x8a8]
mov dword [ebp - 0x894], edi
mov dword [ebp - 0x898], ebx
mov word [ebp - 0x8a8], ax
call fcn.004078c0
push ebx
xor eax, eax
mov byte [ebp - 4], 1
push 0x501100
lea ecx, [ebp - 0x890]
mov dword [ebp - 0x87c], edi
mov dword [ebp - 0x880], ebx
mov word [ebp - 0x890], ax
call fcn.004078c0
push ebx
xor eax, eax
mov byte [ebp - 4], 2
push 0x501100
lea ecx, [ebp - 0x878]
mov dword [ebp - 0x864], edi
mov dword [ebp - 0x868], ebx
mov word [ebp - 0x878], ax
call fcn.004078c0
push ebx
push 0x2b
lea eax, [ebp - 0x420]
mov byte [ebp - 4], 3
push eax
push ebx
call fcn.004303c8
mov ebx, 0x503374
lea eax, [ebp - 0x420]
push ebx
push eax
call fcn.004a403b
mov edi, 0x501550
lea eax, [ebp - 0x420]
push edi
push eax
call fcn.004a403b
lea eax, [ebp - 0x420]
push ebx
push eax
call fcn.004a403b
lea eax, [ebp - 0x420]
push edi
push eax
call fcn.004a403b
push 0x503378
lea eax, [ebp - 0x420]
push eax
call fcn.004a403b
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x420]
add esp, 0x38
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x501100
push str.CfgPath
push str.WNGBQJCfg
call ebx
lea eax, [ebp - 0x218]
push eax
call fcn.00497313
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
pop ecx
test eax, eax
jle 0x42139a
lea eax, [ebp - 0x218]
push eax
call edi
test eax, eax
je 0x42139a
cmp word [ebp - 0x218], 0
jne 0x421341
xor eax, eax
jmp 0x42134e
lea eax, [ebp - 0x218]
push eax
call fcn.00497313
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x860]
call fcn.004078c0
cmp word [ebp - 0x218], 0
jne 0x42136f
xor eax, eax
jmp 0x42137c
lea eax, [ebp - 0x218]
push eax
call fcn.00497313
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [esi + 0xc]
call fcn.004078c0
cmp byte [esi + 3], 0
mov byte [esi + 2], 1
je 0x4216a2
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.0048faf0
add esp, 0xc
cmp dword [esi + 0x4c], 0
jne 0x4213e3
push 0x104
lea eax, [ebp - 0x628]
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x628]
push 0x5c
push eax
call fcn.0048fc4a
pop ecx
pop ecx
xor ecx, ecx
mov word [eax + 2], cx
jmp 0x4213fd
lea eax, [esi + 0x3c]
cmp dword [eax + 0x14], 8
jb 0x4213ee
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x628]
push eax
call fcn.004972f1
pop ecx
pop ecx
push 0x208
lea eax, [ebp - 0x830]
push 0
push eax
call fcn.0048faf0
push str.WnGameBox.ini
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x830]
push 0x5033c4
push eax
call fcn.00407bc0
add esp, 0x1c
lea eax, [ebp - 0x830]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x501100
push str.CfgPath
push str.WNGBAppInfo
call ebx
lea eax, [ebp - 0x218]
push eax
call fcn.00497313
pop ecx
test eax, eax
jle 0x4214d9
lea eax, [ebp - 0x218]
push eax
call edi
test eax, eax
je 0x4214d9
cmp word [ebp - 0x218], 0
jne 0x421480
xor eax, eax
jmp 0x42148d
lea eax, [ebp - 0x218]
push eax
call fcn.00497313
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x8a8]
call fcn.004078c0
cmp word [ebp - 0x218], 0
jne 0x4214ae
xor eax, eax
jmp 0x4214bb
lea eax, [ebp - 0x218]
push eax
call fcn.00497313
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [esi + 0xc]
call fcn.004078c0
cmp byte [esi + 3], 0
mov byte [esi + 2], 1
je 0x4216a2
lea eax, [esi + 0x54]
cmp dword [eax + 0x14], 8
jb 0x4214e4
mov eax, dword [eax]
push str.WnGameBox.ini
push eax
lea eax, [ebp - 0x830]
push 0x5033c4
push eax
call fcn.00407bc0
add esp, 0x10
lea eax, [ebp - 0x830]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x501100
push str.CfgPath
push str.WNGBAppInfo
call ebx
lea eax, [ebp - 0x218]
push eax
call fcn.00497313
pop ecx
test eax, eax
jle 0x4215a7
lea eax, [ebp - 0x218]
push eax
call edi
test eax, eax
je 0x4215a7
cmp word [ebp - 0x218], 0
jne 0x42154e
xor eax, eax
jmp 0x42155b
lea eax, [ebp - 0x218]
push eax
call fcn.00497313
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x890]
call fcn.004078c0
cmp word [ebp - 0x218], 0
jne 0x42157c
xor eax, eax
jmp 0x421589
lea eax, [ebp - 0x218]
push eax
call fcn.00497313
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [esi + 0xc]
call fcn.004078c0
cmp byte [esi + 3], 0
mov byte [esi + 2], 1
je 0x4216a2
push 0x501100
push str.CfgPath
push str.WNGBAppInfo
lea eax, [ebp - 0x848]
mov ecx, esi
push eax
call fcn.00420e25
cmp dword [ebp - 0x834], 8
lea eax, [ebp - 0x848]
mov byte [ebp - 4], 4
cmovae eax, dword [ebp - 0x848]
push eax
call fcn.00497313
pop ecx
test eax, eax
jle 0x421639
cmp dword [ebp - 0x834], 8
lea eax, [ebp - 0x848]
cmovae eax, dword [ebp - 0x848]
push eax
call edi
test eax, eax
je 0x421639
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x848]
push eax
lea ecx, [ebp - 0x878]
call fcn.004077a0
lea ecx, [esi + 0xc]
lea eax, [ebp - 0x848]
cmp ecx, eax
je 0x42162f
push 0xffffffffffffffff
push 0
push eax
call fcn.004077a0
cmp byte [esi + 3], 0
mov byte [esi + 2], 1
je 0x421693
cmp byte [esi + 3], 0
je 0x421693
cmp byte [esi + 2], 0
je 0x421693
lea eax, [ebp - 0x8a8]
push eax
lea ecx, [ebp - 0x860]
call fcn.00422120
test eax, eax
je 0x42165f
mov byte [esi + 4], 1
lea eax, [ebp - 0x890]
push eax
lea ecx, [ebp - 0x860]
call fcn.00422120
test eax, eax
je 0x421679
mov byte [esi + 4], 1
lea eax, [ebp - 0x878]
push eax
lea ecx, [ebp - 0x860]
call fcn.00422120
test eax, eax
je 0x421693
mov byte [esi + 4], 1
push 0
push 1
lea ecx, [ebp - 0x848]
call fcn.0040e4d0
push 0
push 1
lea ecx, [ebp - 0x878]
call fcn.0040e4d0
push 0
push 1
lea ecx, [ebp - 0x890]
call fcn.0040e4d0
push 0
push 1
lea ecx, [ebp - 0x8a8]
call fcn.0040e4d0
push 0
push 1
lea ecx, [ebp - 0x860]
call fcn.0040e4d0
call fcn.0041c5d7
ret