Function at 0x404b10
Capabilities:
Get common file path
Get session user name
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411fd3
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x41b014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x118], esi
mov dword [ebp - 0x124], esi
lea edi, [esi + 0x10]
mov dword [ebp - 0x128], 0
lea ecx, [esi + 0x68]
mov dword [ebp - 0x150], esi
mov dword [esi], 0x41503c
mov dword [edi], 0x4156a8
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
mov dword [ebp - 4], 0
add esi, 0x18
mov ecx, dword [ebp - 0x11c]
push 0
push esi
mov dword [ebp - 0x128], 1
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_iostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char____]
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x11c]
mov dword [ebp - 0x14c], esi
mov eax, dword [edx]
mov eax, dword [eax + 4]
mov dword [edx + eax], vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [edx]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ecx + edx - 4], eax
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
mov dword [esi], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov dword [esi + 0x38], 0
mov dword [esi + 0x3c], 0
mov dword [ebp - 4], 2
mov ecx, dword [ebp - 0x11c]
mov dword [ecx + 0x7d0], 0
mov dword [ecx + 0x7e0], 0
mov dword [ecx + 0x7e4], 0xf
mov byte [ecx + 0x7d0], 0
mov dword [ecx + 0x7e8], 0
mov dword [ecx + 0x7f8], 0
mov dword [ecx + 0x7fc], 0xf
mov byte [ecx + 0x7e8], 0
mov dword [ecx + 0x800], 0
mov dword [ecx + 0x810], 0
mov dword [ecx + 0x814], 0xf
mov byte [ecx + 0x800], 0
lea eax, [ecx + 0x818]
mov dword [eax], 0
mov dword [ebp - 0x150], eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ecx + 0x830]
mov dword [eax], 0
mov dword [ebp - 0x148], eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ecx + 0x848]
mov dword [eax], 0
mov dword [ebp - 0x154], eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ecx + 0x860]
mov dword [eax], 0
mov dword [ebp - 0x158], eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ecx + 0x878]
mov dword [eax], 0
mov dword [ebp - 0x168], eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ecx + 0x890]
mov dword [eax], 0
mov dword [ebp - 0x14c], eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea edx, [ecx + 0x8a8]
mov dword [edx], 0
mov dword [ebp - 0x128], edx
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0xf
mov byte [edx], 0
lea eax, [ecx + 0x8c0]
mov dword [eax], 0
mov dword [ebp - 0x15c], eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea edx, [ecx + 0x8d8]
mov dword [edx], 0
mov dword [ebp - 0x160], edx
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0xf
mov byte [edx], 0
mov dword [ecx + 0x8f0], 0
mov dword [ecx + 0x900], 0
mov dword [ecx + 0x904], 0xf
mov byte [ecx + 0x8f0], 0
lea eax, [ecx + 0x908]
mov dword [ecx + 0x908], 0
mov dword [ebp - 0x164], eax
mov dword [ecx + 0x918], 0
mov dword [ecx + 0x91c], 0xf
mov byte [ecx + 0x908], 0
lea esi, [ecx + 0x6c9]
mov byte [ebp - 4], 0x10
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
call dword [sym.imp.SHLWAPI.dll_PathStripToRootA]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__getdrive]
mov esi, dword [ebp - 0x11c]
add al, 0x40
mov dl, al
mov ecx, edi
mov byte [esi + 0x6c8], al
call fcn.0040f5a0
lea edi, [esi + 0x7e8]
mov ecx, esi
mov edx, edi
call fcn.004100d0
mov ecx, dword [edi + 0x10]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 2
jb 0x4055c0
cmp dword [edi + 0x14], 0x10
jb 0x404e54
mov edi, dword [edi]
push 2
push 0x414ab4
push ecx
push edi
push ecx
push dword [ebp - 0x124]
lea ecx, [ebp - 0x140]
call fcn.0040ffb0
lea eax, [ebp - 0x140]
lea edi, [esi + 0x800]
cmp edi, eax
je 0x404edc
mov ecx, dword [edi + 0x14]
cmp ecx, 0x10
jb 0x404eb2
mov eax, dword [edi]
inc ecx
cmp ecx, 0x1000
jb 0x404ea8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4054f9
mov eax, edx
push ecx
push eax
call fcn.00410dcc
add esp, 8
movups xmm0, xmmword [ebp - 0x140]
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
movups xmmword [edi], xmm0
movq xmm0, qword [ebp - 0x130]
movq qword [edi + 0x10], xmm0
jmp 0x404f16
mov edx, dword [ebp - 0x12c]
cmp edx, 0x10
jb 0x404f16
mov ecx, dword [ebp - 0x140]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404f0c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4054f9
push edx
push ecx
call fcn.00410dcc
add esp, 8
push 0x104
lea eax, [esi + 0xb0]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x104
lea eax, [esi + 0x2b8]
push eax
lea eax, [esi + 0xb0]
push eax
call dword [sym.imp.COMDLG32.dll_GetFileTitleW]
lea eax, [esi + 0xb0]
test eax, eax
je 0x404fb5
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404f52
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
mov dword [ebp - 0x144], eax
cmp eax, 0x3fffffff
jg 0x404fb5
add eax, eax
call fcn.00411060
mov eax, esp
mov dword [ebp - 0x120], eax
test eax, eax
je 0x404fb5
mov edx, dword [ebp - 0x144]
push 0
push 0
mov byte [eax], 0
lea ecx, [edx + edx]
push ecx
push eax
push 0xffffffffffffffff
lea eax, [esi + 0xb0]
push eax
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb ecx, ecx
and ecx, dword [ebp - 0x120]
jmp 0x404fb7
xor ecx, ecx
mov edx, ecx
lea eax, [edx + 1]
mov dword [ebp - 0x120], eax
mov al, byte [edx]
inc edx
test al, al
jne 0x404fc2
sub edx, dword [ebp - 0x120]
push edx
push ecx
lea ecx, [esi + 0x7d0]
call fcn.0040f0c0
add esi, 0x4c0
push esi
push 0
push 0
push 5
push 0
mov dword [ebp - 0x144], esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test esi, esi
je 0x405058
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405000
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
mov dword [ebp - 0x120], eax
cmp eax, 0x3fffffff
jg 0x405058
add eax, eax
call fcn.00411060
mov esi, esp
test esi, esi
je 0x405058
mov ecx, dword [ebp - 0x120]
push 0
push 0
mov byte [esi], 0
lea eax, [ecx + ecx]
push eax
push esi
push 0xffffffffffffffff
push dword [ebp - 0x144]
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb ecx, ecx
and ecx, esi
jmp 0x40505a
xor ecx, ecx
mov edx, ecx
lea esi, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x405060
sub edx, esi
push edx
push ecx
mov ecx, dword [ebp - 0x148]
call fcn.0040f0c0
mov esi, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
push str.TEMP
call esi
mov edx, eax
add esp, 4
lea ecx, [edx + 1]
mov dword [ebp - 0x148], ecx
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x405091
sub edx, dword [ebp - 0x148]
mov ecx, dword [ebp - 0x154]
push edx
push eax
call fcn.0040f0c0
push str.USERNAME
call esi
mov esi, eax
add esp, 4
lea ecx, [esi + 1]
nop word [eax + eax]
mov dl, byte [esi]
inc esi
test dl, dl
jne 0x4050c0
sub esi, ecx
mov ecx, dword [ebp - 0x158]
push esi
push eax
call fcn.0040f0c0
push str.systemroot
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edx, eax
add esp, 4
lea esi, [edx + 1]
nop dword [eax]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x4050f0
sub edx, esi
mov esi, dword [ebp - 0x15c]
push edx
push eax
mov ecx, esi
call fcn.0040f0c0
mov ecx, dword [esi + 0x10]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 9
jb 0x4055c0
cmp dword [esi + 0x14], 0x10
jb 0x405123
mov esi, dword [esi]
push 9
push str._system32
push ecx
push esi
push ecx
push dword [ebp - 0x124]
lea ecx, [ebp - 0x140]
call fcn.0040ffb0
mov esi, dword [ebp - 0x160]
lea eax, [ebp - 0x140]
cmp esi, eax
je 0x4051ab
mov ecx, dword [esi + 0x14]
cmp ecx, 0x10
jb 0x405181
mov eax, dword [esi]
inc ecx
cmp ecx, 0x1000
jb 0x405177
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4054f9
mov eax, edx
push ecx
push eax
call fcn.00410dcc
add esp, 8
movups xmm0, xmmword [ebp - 0x140]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x130]
movq qword [esi + 0x10], xmm0
jmp 0x4051e5
mov edx, dword [ebp - 0x12c]
cmp edx, 0x10
jb 0x4051e5
mov ecx, dword [ebp - 0x140]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4051db
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4054f9
push edx
push ecx
call fcn.00410dcc
add esp, 8
mov ecx, dword [edi + 0x10]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 7
jb 0x4055c0
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x405202
mov eax, dword [edi]
push 7
push str.windows
push ecx
push eax
push ecx
push dword [ebp - 0x124]
lea ecx, [ebp - 0x140]
call fcn.0040ffb0
mov esi, dword [ebp - 0x164]
lea eax, [ebp - 0x140]
cmp esi, eax
je 0x40528a
mov ecx, dword [esi + 0x14]
cmp ecx, 0x10
jb 0x405260
mov eax, dword [esi]
inc ecx
cmp ecx, 0x1000
jb 0x405256
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4054f9
mov eax, edx
push ecx
push eax
call fcn.00410dcc
add esp, 8
movups xmm0, xmmword [ebp - 0x140]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x130]
movq qword [esi + 0x10], xmm0
jmp 0x4052c4
mov edx, dword [ebp - 0x12c]
cmp edx, 0x10
jb 0x4052c4
mov ecx, dword [ebp - 0x140]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4052ba
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4054f9
push edx
push ecx
call fcn.00410dcc
add esp, 8
push str.ALLUSERSPROFILE
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov esi, eax
add esp, 4
lea ecx, [esi + 1]
mov dl, byte [esi]
inc esi
test dl, dl
jne 0x4052d7
sub esi, ecx
mov ecx, dword [ebp - 0x168]
push esi
push eax
call fcn.0040f0c0
push str.programfiles
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edx, eax
add esp, 4
lea esi, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x405300
sub edx, esi
mov esi, dword [ebp - 0x14c]
push edx
push eax
mov ecx, esi
call fcn.0040f0c0
mov ecx, dword [esi + 0x10]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 0xd
jb 0x4055c0
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x405335
mov eax, dword [esi]
push 0xd
push str.Common_Files
push ecx
push eax
push ecx
push dword [ebp - 0x124]
lea ecx, [ebp - 0x140]
call fcn.0040ffb0
mov esi, dword [ebp - 0x128]
lea eax, [ebp - 0x140]
cmp esi, eax
je 0x4053bd
mov ecx, dword [esi + 0x14]
cmp ecx, 0x10
jb 0x405393
mov eax, dword [esi]
inc ecx
cmp ecx, 0x1000
jb 0x405389
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4054f9
mov eax, edx
push ecx
push eax
call fcn.00410dcc
add esp, 8
movups xmm0, xmmword [ebp - 0x140]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x130]
movq qword [esi + 0x10], xmm0
jmp 0x4053f7
mov edx, dword [ebp - 0x12c]
cmp edx, 0x10
jb 0x4053f7
mov ecx, dword [ebp - 0x140]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4053ed
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4054f9
push edx
push ecx
call fcn.00410dcc
add esp, 8
push str.appdata
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edx, eax
add esp, 4
lea esi, [edx + 1]
nop word [eax + eax]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x405410
sub edx, esi
mov esi, dword [ebp - 0x150]
push edx
push eax
mov ecx, esi
call fcn.0040f0c0
mov eax, dword [esi + 0x10]
mov ecx, 0x7fffffff
sub ecx, eax
cmp ecx, 0x23
jb 0x4055c0
cmp dword [esi + 0x14], 0x10
jb 0x405443
mov esi, dword [esi]
push 0x23
push str.MicrosoftWindowsAccountPictures_
push eax
push esi
push ecx
push dword [ebp - 0x124]
lea ecx, [ebp - 0x140]
call fcn.0040ffb0
mov esi, dword [ebp - 0x11c]
lea ecx, [ebp - 0x140]
add esi, 0x8f0
cmp esi, ecx
je 0x4054cd
mov ecx, dword [esi + 0x14]
cmp ecx, 0x10
jb 0x4054a3
mov eax, dword [esi]
inc ecx
cmp ecx, 0x1000
jb 0x405499
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4054f9
mov eax, edx
push ecx
push eax
call fcn.00410dcc
add esp, 8
movups xmm0, xmmword [ebp - 0x140]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x130]
movq qword [esi + 0x10], xmm0
jmp 0x405509
mov edx, dword [ebp - 0x12c]
cmp edx, 0x10
jb 0x405509
mov ecx, dword [ebp - 0x140]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4054ff
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4054ff
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00410dcc
add esp, 8
mov edx, dword [ebp - 0x128]
cmp dword [edx + 0x14], 0x10
jb 0x405517
mov edx, dword [edx]
mov eax, dword [ebp - 0x11c]
mov dword [eax + 0x920], edx
cmp dword [esi + 0x14], 0x10
jb 0x40552b
mov esi, dword [esi]
mov dword [eax + 0x924], esi
cmp dword [edi + 0x14], 0x10
jb 0x405539
mov edi, dword [edi]
lea ecx, [eax + 0x890]
mov dword [eax + 0x928], edi
cmp dword [ecx + 0x14], 0x10
jb 0x40554d
mov ecx, dword [ecx]
lea edx, [eax + 0x8d8]
mov dword [eax + 0x92c], ecx
cmp dword [edx + 0x14], 0x10
jb 0x405561
mov edx, dword [edx]
lea ecx, [eax + 0x848]
mov dword [eax + 0x930], edx
cmp dword [ecx + 0x14], 0x10
jb 0x405575
mov ecx, dword [ecx]
mov dword [eax + 0x934], ecx
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x114]
mov dword [ebp - 0x118], 0x101
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov eax, dword [ebp - 0x11c]
lea esp, [ebp - 0x174]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00410a23
mov esp, ebp
pop ebp
ret
call fcn.00401460
int3