Function at 0x40e060
Capabilities:
Access peb ldr_data
Get common file path
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x507ac8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push esi
mov esi, ecx
push edi
push str.Create_Kernel_Folder...
lea ecx, [esp + 0x10]
call fcn.004ea7b5
mov eax, dword [esp + 0xc]
push 0
push 2
push eax
mov dword [esp + 0x30], 0
call fcn.0041e3a0
add esp, 0xc
lea ecx, [esp + 8]
push 0x556998
call fcn.004ea7b5
push 0x104
push 0x104
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 1
call fcn.004eab86
push eax
push 0x540b3c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x104
jbe 0x40e10e
call edi
push eax
lea ecx, [esp + 0x10]
push str._tGet_All_UserPath_failed._LastError:_d_n
push ecx
call fcn.004e3c81
mov edx, dword [esp + 0x18]
push 0
push 1
push edx
call fcn.0041e3a0
add esp, 0x18
lea ecx, [esp + 8]
call fcn.004ea6c9
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call fcn.004eabd6
push 0x53d42c
lea ecx, [esp + 0xc]
call fcn.004e3dac
lea eax, [esp + 0x10]
push str._Y_m_d_H_M_S
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.004e4218
mov ecx, eax
call fcn.004e44a2
add esi, 0xd4
lea edx, [esp + 8]
push edx
mov ecx, esi
mov byte [esp + 0x28], 2
call fcn.004ea888
mov eax, dword [esp + 8]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x40e178
mov ecx, dword [esp + 0x10]
push ecx
push eax
push str._sIPGASKERNEL_s_
push esi
call fcn.004e3c81
add esp, 0x10
mov edx, dword [esi]
lea eax, [esp + 0xc]
push edx
push str._tCreate_Kernel_folder__s..._r_n
push eax
call fcn.004e3c81
mov ecx, dword [esp + 0x18]
push 0
push 2
push ecx
call fcn.0041e3a0
mov eax, dword [esi]
push eax
call fcn.00421920
add esp, 0x1c
test eax, eax
jne 0x40e290
call edi
push eax
lea edx, [esp + 0x10]
push str._tCreate_folder_failed._LastError:_d_r_n
push edx
call fcn.004e3c81
mov eax, dword [esp + 0x18]
push 0
push 1
push eax
call fcn.0041e3a0
add esp, 0x18
lea ecx, [esp + 8]
push 0x556998
call fcn.004ea8d8
push 0x104
push 0x104
lea ecx, [esp + 0x10]
call fcn.004eab86
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call fcn.004eabd6
push 0x53d42c
lea ecx, [esp + 0xc]
call fcn.004e3dac
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 8]
push ecx
push edx
push str._sTempIPGASKERNEL_s_
push esi
call fcn.004e3c81
mov eax, dword [esi]
add esp, 0x10
lea ecx, [esp + 0xc]
push eax
push str._tCreate_Kernel_folder__s..._r_n
push ecx
call fcn.004e3c81
mov edx, dword [esp + 0x18]
push 0
push 2
push edx
call fcn.0041e3a0
mov esi, dword [esi]
push esi
call fcn.00421920
add esp, 0x1c
test eax, eax
jne 0x40e290
call edi
push eax
lea eax, [esp + 0x10]
push str._tCreate_folder_failed._LastError:_d_r_n
push eax
call fcn.004e3c81
mov ecx, dword [esp + 0x18]
push 0
push 1
push ecx
call fcn.0041e3a0
add esp, 0x18
lea edx, [esp + 0x14]
mov dword [esp + 0x14], 0x67
push 0x52b250
push edx
call fcn.0043553a
lea ecx, [esp + 0x10]
mov byte [esp + 0x24], 1
call fcn.004ea741
lea ecx, [esp + 8]
mov byte [esp + 0x24], 0
call fcn.004ea741
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0xffffffff
call fcn.004ea741
mov ecx, dword [esp + 0x1c]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x20
ret