Function at 0x4047d0
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x644
mov eax, dword [0x5052a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x634], ecx
mov eax, dword [ebp - 0x634]
mov dword [eax], 0x4e0be4
mov ecx, dword [ebp - 0x634]
add ecx, 4
call fcn.00404590
mov ecx, dword [ebp - 0x634]
add ecx, 0x20
call fcn.00406640
mov ecx, dword [ebp - 0x634]
add ecx, 0x30
call fcn.00404bb0
mov ecx, dword [ebp - 0x634]
mov dword [ecx + 0x34], 1
xor edx, edx
mov word [ebp - 0x628], dx
push 0x206
push 0
lea eax, [ebp - 0x626]
push eax
call fcn.0043ef50
add esp, 0xc
mov dword [ebp - 0x214], 0
push 0x104
lea ecx, [ebp - 0x628]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [ebp - 0x628]
mov dword [ebp - 0x638], edx
mov eax, dword [ebp - 0x638]
add eax, 2
mov dword [ebp - 0x63c], eax
mov ecx, dword [ebp - 0x638]
mov dx, word [ecx]
mov word [ebp - 0x63e], dx
add dword [ebp - 0x638], 2
cmp word [ebp - 0x63e], 0
jne 0x40488b
mov eax, dword [ebp - 0x638]
sub eax, dword [ebp - 0x63c]
sar eax, 1
mov dword [ebp - 0x644], eax
mov ecx, dword [ebp - 0x644]
mov dword [ebp - 0x214], ecx
mov edx, dword [ebp - 0x214]
sub edx, 1
mov dword [ebp - 0x62c], edx
jmp 0x4048ec
mov eax, dword [ebp - 0x62c]
sub eax, 1
mov dword [ebp - 0x62c], eax
cmp dword [ebp - 0x62c], 0
jb 0x404974
mov ecx, dword [ebp - 0x62c]
movzx edx, word [ebp + ecx*2 - 0x628]
cmp edx, 0x5c
jne 0x40496f
mov eax, dword [ebp - 0x62c]
add eax, 1
mov dword [ebp - 0x62c], eax
mov dword [ebp - 0x630], 0
jmp 0x404932
mov ecx, dword [ebp - 0x630]
add ecx, 1
mov dword [ebp - 0x630], ecx
mov edx, dword [ebp - 0x62c]
cmp edx, dword [ebp - 0x214]
ja 0x40496d
mov eax, dword [ebp - 0x630]
mov ecx, dword [ebp - 0x62c]
mov dx, word [ebp + ecx*2 - 0x628]
mov word [ebp + eax*2 - 0x628], dx
mov eax, dword [ebp - 0x62c]
add eax, 1
mov dword [ebp - 0x62c], eax
jmp 0x404923
jmp 0x404974
jmp 0x4048dd
push 0x4df4b0
push 0
call fcn.00436e86
add esp, 8
lea ecx, [ebp - 0x218]
call fcn.00404bb0
push 0x208
push 0
lea ecx, [ebp - 0x210]
push ecx
call fcn.0043ef50
add esp, 0xc
push 0x104
lea edx, [ebp - 0x210]
push edx
push 0x4df4b4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x210]
push eax
push str._sGamePPSdk_app.log.on
lea ecx, [ebp - 0x218]
push ecx
call fcn.00405220
add esp, 0xc
lea ecx, [ebp - 0x218]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [0x509d6c], eax
lea edx, [ebp - 0x210]
push edx
push str._sGamePPSdk_app.log1.on
lea eax, [ebp - 0x218]
push eax
call fcn.00405220
add esp, 0xc
lea ecx, [ebp - 0x218]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [0x509d78], eax
lea ecx, [ebp - 0x210]
push ecx
push str._sGamePPSdk_app.ext.log.on
lea edx, [ebp - 0x218]
push edx
call fcn.00405220
add esp, 0xc
lea ecx, [ebp - 0x218]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [0x509d70], eax
lea eax, [ebp - 0x210]
push eax
push str._sGamePPSdk_app.dbg.on
lea ecx, [ebp - 0x218]
push ecx
call fcn.00405220
add esp, 0xc
lea ecx, [ebp - 0x218]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [0x509d74], eax
push 0x208
push 0
lea edx, [ebp - 0x420]
push edx
call fcn.0043ef50
add esp, 0xc
push 0x104
lea eax, [ebp - 0x420]
push eax
push 1
call fcn.00404790
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.PSAPI.DLL_GetModuleBaseNameW]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea ecx, [ebp - 0x420]
push ecx
lea edx, [ebp - 0x628]
push edx
lea eax, [ebp - 0x210]
push eax
push str._sGamePPSdkLogs_s__s__d.log
mov ecx, dword [ebp - 0x634]
add ecx, 0x30
push ecx
call fcn.00405220
add esp, 0x18
lea ecx, [ebp - 0x218]
call fcn.00403e20
mov eax, dword [ebp - 0x634]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00434ee7
mov esp, ebp
pop ebp
ret