Function at 0x4091b0
Capabilities:
Get file version info
Query environment variable
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x474
mov eax, dword [0x5023a4]
xor eax, esp
mov dword [esp + 0x470], eax
push ebx
push esi
push edi
mov edi, dword [0x506568]
mov ebx, ecx
mov dword [esp + 0x1c], ebx
test edi, edi
jne 0x409202
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov edi, dword [0x506568]
lea ecx, [edi + 0x1454]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409210
sub ecx, edx
sar ecx, 1
cmp ecx, 4
jbe 0x4093d2
test edi, edi
jne 0x409274
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov edi, dword [0x506568]
test edi, edi
jne 0x409274
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
lea eax, [esp + 0x20]
push eax
lea eax, [edi + 0x1454]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x40935a
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x208
lea eax, [esp + 0x24]
push 0
push eax
call fcn.0049b560
add esp, 0xc
lea eax, [esp + 0x20]
push 0x104
push eax
push str._localappdata_GamePPVConfig.ini
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov eax, dword [0x506568]
test eax, eax
jne 0x4092ec
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
lea esi, [eax + 0x1454]
test eax, eax
jne 0x40931a
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
sub eax, esi
lea ecx, [eax + 0x414]
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x409322
lea eax, [esp + 0x20]
push eax
push 0x14
lea eax, [ebx + 0x450]
push eax
push 0x4d9ea8
push 0x4db2f4
push str.GamePlusPlus
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
jmp 0x409443
mov eax, dword [0x506568]
test eax, eax
jne 0x409387
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
lea esi, [eax + 0x61c]
test eax, eax
jne 0x4093b5
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
sub eax, esi
lea ecx, [eax + 0x414]
nop dword [eax]
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x4093c0
jmp 0x409443
test edi, edi
jne 0x4093fb
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov edi, dword [0x506568]
lea esi, [edi + 0x61c]
test edi, edi
jne 0x40942a
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov edi, dword [0x506568]
sub edi, esi
nop dword [eax]
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [edi + esi + 0x412], ax
test ax, ax
jne 0x409430
push 0x208
lea eax, [esp + 0x274]
push 0
push eax
call fcn.0049b560
add esp, 0xc
lea eax, [esp + 0x270]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, dword [0x506568]
test ebx, ebx
jne 0x4094c1
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ebx, dword [0x506568]
test ebx, ebx
jne 0x4094c1
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x274]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [esp + 0xc], eax
test eax, eax
je 0x409569
push eax
push 2
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
lea eax, [esp + 0x270]
push esi
push dword [esp + 0x10]
push dword [esp + 0x18]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x1c]
push eax
push 0x4da000
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x18]
movzx esi, word [eax + 0x12]
movzx edx, word [eax + 0x10]
movzx ecx, word [eax + 0x16]
movzx eax, word [eax + 0x14]
push eax
push ecx
push edx
push esi
lea eax, [ebx + 0x1044]
push str._d._d._d._d
push eax
call fcn.00410d80
add esp, 0x18
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x409666
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0xc], eax
mov eax, dword [0x506568]
test eax, eax
jne 0x4095b1
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
add eax, 0x1044
push eax
lea eax, [esp + 0x10]
push 0x4db304
push eax
call fcn.004040c0
mov esi, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [esi + 0x47c]
test ecx, ecx
je 0x4095e0
mov eax, dword [ecx]
push dword [esp + 0xc]
call dword [eax + 0x2c]
mov eax, dword [0x506568]
test eax, eax
jne 0x40960d
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
add eax, 0x1044
push eax
lea eax, [esp + 0x10]
push str.GamePP_V_s_Setup
push eax
call fcn.004040c0
mov ecx, dword [esi + 0x4b0]
add esp, 0xc
mov esi, dword [esp + 0xc]
test ecx, ecx
je 0x409639
mov eax, dword [ecx]
push esi
call dword [eax + 0x2c]
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x409651
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esp + 0x47c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0049765c
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402f10
int3