Function at 0x413e40
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x618
mov esi, ecx
lea edi, [ebp - 0x41c]
push 0x104
push edi
push 0x419cb6
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
add eax, 0xfffffefc
cmp eax, 0xfffffefc
ja 0x413e8e
mov word [ebp - 0x414], 0
mov dword [ebp - 0x418], 0x470024
mov dword [ebp - 0x41c], 0x500024
lea ebx, [ebp - 0x214]
test esi, esi
je 0x413ea8
mov dword [ebp - 0x214], 0xa000d
lea ebx, [ebp - 0x210]
mov word [ebx], 0
mov ecx, dword [0x419f9c]
jmp 0x413eca
mov eax, ebx
mov ecx, esi
nop dword [eax]
add edi, 4
mov word [eax], 0
mov ebx, eax
movzx eax, word [edi]
cmp eax, 0x24
je 0x413ef0
test eax, eax
je 0x414111
add edi, 2
mov word [ebx], ax
add ebx, 2
mov word [ebx], 0
jmp 0x413eca
mov esi, ecx
movzx eax, word [edi + 2]
push eax
call dword [sym.imp.ucrtbase.dll_towupper]
add esp, 4
movzx eax, ax
add eax, 0xffffffdc
cmp eax, 0x3b
ja case.default.0x413f0d
mov ecx, esi
jmp dword [eax*4 + 0x419340]
mov word [ebx], 0x24
jmp 0x4140c0
mov word [ebx], 0x3d
jmp 0x4140c0
mov word [ebx], 0x3c
jmp 0x4140c0
mov word [ebx], 0x28
jmp 0x4140c0
lea eax, [ebp - 0x624]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
test eax, eax
je case.default.0x413f0d
add ebx, 0xfffffffe
mov eax, ebx
nop dword [eax + eax]
cmp word [eax + 2], 0
lea eax, [eax + 2]
jne 0x413f60
xor ecx, ecx
nop dword [eax]
movzx edx, word [ebp + ecx - 0x624]
mov word [eax + ecx], dx
add ecx, 2
test dx, dx
jne 0x413f70
mov ecx, esi
nop word cs:[eax + eax]
lea eax, [ebx + 2]
cmp word [ebx + 2], 0
mov ebx, eax
jne 0x413f90
jmp 0x413ec0
mov eax, dword [ecx]
test eax, eax
je case.0x413f0d.37
push dword [eax + 4]
push 0x2b
push ebx
call sym._memset
mov ecx, esi
add esp, 0xc
mov eax, dword [esi]
mov eax, dword [eax + 4]
lea eax, [ebx + eax*2]
jmp 0x413ec0
mov eax, ebx
lea ecx, [ebp - 0x214]
sub eax, ecx
sar eax, 1
mov ecx, 0x104
sub ecx, eax
sub esp, 0x18
mov dword [esp + 0x10], ebx
movaps xmm0, xmmword [0x419330]
movups xmmword [esp], xmm0
mov dword [esp + 0x14], ecx
call dword [sym.imp.kernel32.dll_GetDateFormatW]
mov ecx, esi
add ebx, 0xfffffffe
nop dword [eax]
lea eax, [ebx + 2]
cmp word [ebx + 2], 0
mov ebx, eax
jne 0x414000
jmp 0x413ec0
lea eax, [ebp - 0x624]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
test eax, eax
je case.default.0x413f0d
movzx eax, word [ebp - 0x624]
mov word [ebx], ax
add ebx, 2
jmp case.default.0x413f0d
mov word [ebx], 0x7c
jmp 0x4140c0
mov word [ebx], 0x26
jmp 0x4140c0
mov word [ebx], 0x1b
jmp 0x4140c0
mov word [ebx], 0x29
jmp 0x4140c0
mov word [ebx], 0x20
jmp 0x4140c0
sub esp, 0x18
mov dword [esp + 0x10], ebx
movaps xmm0, xmmword [0x419320]
movups xmmword [esp], xmm0
mov dword [esp + 0x14], 0x104
call dword [sym.imp.kernel32.dll_GetTimeFormatW]
mov ecx, esi
add ebx, 0xfffffffe
nop word cs:[eax + eax]
lea eax, [ebx + 2]
cmp word [ebx + 2], 0
mov ebx, eax
jne 0x414090
jmp 0x413ec0
mov word [ebx], 8
jmp 0x4140c0
mov word [ebx], 0x3e
jmp 0x4140c0
mov word [ebx], 0xa
nop word cs:[eax + eax]
add ebx, 2
mov eax, ebx
jmp 0x413ec0
add ebx, 0xfffffffe
mov eax, ebx
nop
cmp word [eax + 2], 0
lea eax, [eax + 2]
jne 0x4140d0
xor ecx, ecx
nop dword [eax]
movzx edx, word [ecx + 0x42e494]
mov word [eax + ecx], dx
add ecx, 2
test dx, dx
jne 0x4140e0
mov ecx, esi
nop word cs:[eax + eax]
lea eax, [ebx + 2]
cmp word [ebx + 2], 0
mov ebx, eax
jne 0x414100
jmp 0x413ec0
lea edx, [ebp - 0x214]
mov ecx, 0xfffffff5
call dbg.WCMD_output_asis_handle
add esp, 0x618
pop esi
pop edi
pop ebx
pop ebp
ret