Function at 0x40f3d0
Capabilities:
Get common file path
Persist via run registry key
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4905fb
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x4bcad4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x18c], ebx
mov esi, 0xf
mov dword [eax + 0x14], esi
mov dword [eax + 0x10], ebx
mov dword [ebp - 0x190], eax
mov byte [eax], bl
push 0x103
lea eax, [ebp - 0x113]
push ebx
mov edi, 1
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18c], edi
mov byte [ebp - 0x114], bl
call fcn.00477750
add esp, 0xc
push ebx
push 0x10
lea ecx, [ebp - 0x114]
push ecx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x40f4d0
lea eax, [ebp - 0x114]
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x120], ebx
mov byte [ebp - 0x130], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40f475
sub eax, edx
push eax
lea edx, [ebp - 0x114]
push edx
lea ecx, [ebp - 0x130]
call fcn.00401602
lea eax, [ebp - 0x130]
push eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x18c], 3
call fcn.004148d0
add esp, 4
test al, al
je 0x40f4d0
lea ecx, [ebp - 0x114]
push str.systemprofile
push ecx
call fcn.004102b0
add esp, 8
mov byte [ebp - 0x185], 1
test eax, eax
je 0x40f4d6
mov byte [ebp - 0x185], bl
test byte [ebp - 0x18c], 2
mov dword [ebp - 4], ebx
je 0x40f501
and dword [ebp - 0x18c], 0xfffffffd
cmp dword [ebp - 0x11c], 0x10
jb 0x40f501
mov edx, dword [ebp - 0x130]
push edx
call fcn.004777ca
add esp, 4
cmp byte [ebp - 0x185], bl
je 0x40f533
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40f512
mov ecx, dword [ebp - 0x190]
sub eax, edx
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.00401602
jmp 0x40fc09
lea ecx, [ebp - 0x114]
push ecx
push str.UBASE::OsDesktopDir
push str.__s___Error__SHGetSpecialFolderPathA:__s
call fcn.0041bf30
push 0x104
lea edx, [ebp - 0x114]
push ebx
push edx
call fcn.00477750
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
add esp, 0x18
push 0x103
lea eax, [ebp - 0x114]
push eax
push str._USERPROFILE_Desktop
call edi
test eax, eax
je 0x40f5f2
lea eax, [ebp - 0x114]
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x120], ebx
mov byte [ebp - 0x130], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40f596
sub eax, edx
push eax
lea ecx, [ebp - 0x114]
push ecx
lea ecx, [ebp - 0x130]
call fcn.00401602
or dword [ebp - 0x18c], 4
lea edx, [ebp - 0x130]
push edx
mov dword [ebp - 4], 2
call fcn.004148d0
add esp, 4
test al, al
je 0x40f5f2
lea eax, [ebp - 0x114]
push str.systemprofile
push eax
call fcn.004102b0
add esp, 8
mov byte [ebp - 0x185], 1
test eax, eax
je 0x40f5f8
mov byte [ebp - 0x185], bl
test byte [ebp - 0x18c], 4
mov dword [ebp - 4], ebx
je 0x40f623
and dword [ebp - 0x18c], 0xfffffffb
cmp dword [ebp - 0x11c], 0x10
jb 0x40f623
mov ecx, dword [ebp - 0x130]
push ecx
call fcn.004777ca
add esp, 4
lea eax, [ebp - 0x114]
cmp byte [ebp - 0x185], bl
je 0x40f655
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40f634
mov ecx, dword [ebp - 0x190]
sub eax, edx
push eax
lea edx, [ebp - 0x114]
push edx
call fcn.00401602
jmp 0x40fc09
push eax
push str.UBASE::OsDesktopDir
push str.__s___Error__USERPROFILEDesktop:__s
call fcn.0041bf30
push 0x104
lea ecx, [ebp - 0x114]
push ebx
push ecx
call fcn.00477750
add esp, 0x18
push 0x103
lea edx, [ebp - 0x114]
push edx
push str._USERPROFILE__
call edi
test eax, eax
je 0x40f70c
lea eax, [ebp - 0x114]
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x120], ebx
mov byte [ebp - 0x130], bl
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40f6b0
sub eax, edx
push eax
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x130]
call fcn.00401602
or dword [ebp - 0x18c], 8
lea ecx, [ebp - 0x130]
push ecx
mov dword [ebp - 4], 3
call fcn.004148d0
add esp, 4
test al, al
je 0x40f70c
lea edx, [ebp - 0x114]
push str.systemprofile
push edx
call fcn.004102b0
add esp, 8
mov byte [ebp - 0x185], 1
test eax, eax
je 0x40f712
mov byte [ebp - 0x185], bl
test byte [ebp - 0x18c], 8
mov dword [ebp - 4], ebx
mov edi, 0x10
je 0x40f741
and dword [ebp - 0x18c], 0xfffffff7
cmp dword [ebp - 0x11c], edi
jb 0x40f741
mov eax, dword [ebp - 0x130]
push eax
call fcn.004777ca
add esp, 4
cmp byte [ebp - 0x185], bl
je 0x40f773
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40f752
sub eax, edx
push eax
lea ecx, [ebp - 0x114]
push ecx
mov ecx, dword [ebp - 0x190]
call fcn.00401602
jmp 0x40fc09
lea edx, [ebp - 0x114]
push edx
push str.UBASE::OsDesktopDir
push str.__s___Error__USERPROFILE_
call fcn.0041bf30
add esp, 0xc
mov dword [ebp - 0x138], esi
mov dword [ebp - 0x13c], ebx
mov byte [ebp - 0x14c], bl
push 0x20119
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push reloc.WS2_32.dll_accept
lea ecx, [ebp - 0x198]
mov dword [ebp - 4], 4
call fcn.0041c310
lea eax, [ebp - 0x14c]
push eax
push str.Desktop
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 5
call fcn.0041c360
cmp dword [ebp - 0x13c], ebx
je 0x40f837
mov eax, dword [ebp - 0x14c]
cmp dword [ebp - 0x138], edi
jae 0x40f7f6
lea eax, [ebp - 0x14c]
push str.systemprofile
push eax
call fcn.004102b0
add esp, 8
test eax, eax
jne 0x40f837
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0x14c]
push ecx
mov ecx, dword [ebp - 0x190]
call fcn.00401332
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 4
call fcn.0041d2d0
cmp dword [ebp - 0x138], edi
jmp 0x40fbf8
mov eax, dword [ebp - 0x14c]
cmp dword [ebp - 0x138], edi
jae 0x40f84b
lea eax, [ebp - 0x14c]
push eax
push str.UBASE::OsDesktopDir
push str.__s___Error__Regedit_Shell_Folders:__s
call fcn.0041bf30
lea eax, [ebp - 0x184]
push eax
call fcn.0040e180
add esp, 0x10
cmp dword [ebp - 0x174], ebx
jne 0x40f8b5
cmp dword [ebp - 0x170], edi
jb 0x40f889
mov ecx, dword [ebp - 0x184]
push ecx
call fcn.004777ca
add esp, 4
lea ecx, [ebp - 0x198]
mov dword [ebp - 0x170], esi
mov dword [ebp - 0x174], ebx
mov byte [ebp - 0x184], bl
mov byte [ebp - 4], 4
call fcn.0041d2d0
cmp dword [ebp - 0x138], edi
jmp 0x40fbf8
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x120], ebx
mov dword [ebp - 0x11c], ebx
push 0x13
push str.C:Users_sDesktop
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 7
mov dword [ebp - 0x154], esi
mov dword [ebp - 0x158], ebx
mov byte [ebp - 0x168], bl
call fcn.00401602
lea eax, [ebp - 0x168]
push eax
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 8
call fcn.00409f92
mov byte [ebp - 4], 7
cmp dword [ebp - 0x154], edi
jb 0x40f920
mov ecx, dword [ebp - 0x168]
push ecx
call fcn.004777ca
add esp, 4
push 0x24
push str.C:Documents_and_Settings_sDesktop
lea ecx, [ebp - 0x168]
mov dword [ebp - 0x154], esi
mov dword [ebp - 0x158], ebx
mov byte [ebp - 0x168], bl
call fcn.00401602
lea edx, [ebp - 0x168]
push edx
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 9
call fcn.00409f92
mov byte [ebp - 4], 7
cmp dword [ebp - 0x154], edi
jb 0x40f975
mov eax, dword [ebp - 0x168]
push eax
call fcn.004777ca
add esp, 4
push edi
push str.C:Users_s_
lea ecx, [ebp - 0x168]
mov dword [ebp - 0x154], esi
mov dword [ebp - 0x158], ebx
mov byte [ebp - 0x168], bl
call fcn.00401602
lea ecx, [ebp - 0x168]
push ecx
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 0xa
call fcn.00409f92
mov byte [ebp - 4], 7
cmp dword [ebp - 0x154], edi
jb 0x40f9c9
mov edx, dword [ebp - 0x168]
push edx
call fcn.004777ca
add esp, 4
push 0x21
push str.C:Documents_and_Settings_s_
lea ecx, [ebp - 0x168]
mov dword [ebp - 0x154], esi
mov dword [ebp - 0x158], ebx
mov byte [ebp - 0x168], bl
call fcn.00401602
lea eax, [ebp - 0x168]
push eax
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 0xb
call fcn.00409f92
mov byte [ebp - 4], 7
cmp dword [ebp - 0x154], edi
jb 0x40fa1e
mov ecx, dword [ebp - 0x168]
push ecx
call fcn.004777ca
add esp, 4
mov edi, dword [ebp - 0x124]
cmp edi, dword [ebp - 0x120]
je 0x40fb66
mov ecx, dword [ebp - 0x184]
mov eax, 0x10
cmp dword [ebp - 0x170], eax
jae 0x40fa49
lea ecx, [ebp - 0x184]
cmp dword [edi + 0x14], eax
jb 0x40fa52
mov eax, dword [edi]
jmp 0x40fa54
mov eax, edi
push ecx
push eax
lea edx, [ebp - 0x168]
push edx
call fcn.00411ea0
add esp, 0xc
mov esi, eax
lea eax, [ebp - 0x14c]
cmp eax, esi
je 0x40fae4
cmp dword [ebp - 0x138], 0x10
jb 0x40fa89
mov ecx, dword [ebp - 0x14c]
push ecx
call fcn.004777ca
add esp, 4
mov dword [ebp - 0x138], 0xf
mov dword [ebp - 0x13c], ebx
mov byte [ebp - 0x14c], bl
cmp dword [esi + 0x14], 0x10
jae 0x40fabc
mov eax, dword [esi + 0x10]
inc eax
push eax
lea edx, [ebp - 0x14c]
push esi
push edx
call fcn.004756f0
add esp, 0xc
jmp 0x40fac6
mov eax, dword [esi]
mov dword [ebp - 0x14c], eax
mov dword [esi], ebx
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x13c], ecx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x138], edx
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov byte [esi], bl
cmp dword [ebp - 0x154], 0x10
mov byte [ebp - 4], 7
jb 0x40fb00
mov eax, dword [ebp - 0x168]
push eax
call fcn.004777ca
add esp, 4
lea ecx, [ebp - 0x14c]
push ecx
call fcn.004148d0
add esp, 4
test al, al
jne 0x40fb4c
cmp dword [ebp - 0x138], 0x10
mov eax, dword [ebp - 0x14c]
jae 0x40fb28
lea eax, [ebp - 0x14c]
push eax
push str.UBASE::OsDesktopDir
push str.__s___Error__Attempt_access_failed:__s
call fcn.0041bf30
add edi, 0x1c
add esp, 0xc
cmp edi, dword [ebp - 0x120]
jne 0x40fa30
jmp 0x40fb61
mov ecx, dword [ebp - 0x190]
push 0xffffffffffffffff
push ebx
lea edx, [ebp - 0x14c]
push edx
call fcn.00401332
mov esi, 0xf
cmp dword [ebp - 0x124], ebx
je 0x40fbb8
mov esi, dword [ebp - 0x124]
mov edi, dword [ebp - 0x120]
cmp esi, edi
je 0x40fba4
mov edi, edi
cmp dword [esi + 0x14], 0x10
jb 0x40fb91
mov eax, dword [esi]
push eax
call fcn.004777ca
add esp, 4
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov byte [esi], bl
add esi, 0x1c
cmp esi, edi
jne 0x40fb80
mov eax, dword [ebp - 0x124]
push eax
call fcn.004777ca
add esp, 4
mov esi, 0xf
cmp dword [ebp - 0x170], 0x10
jb 0x40fbd0
mov ecx, dword [ebp - 0x184]
push ecx
call fcn.004777ca
add esp, 4
lea ecx, [ebp - 0x198]
mov dword [ebp - 0x170], esi
mov dword [ebp - 0x174], ebx
mov byte [ebp - 0x184], bl
mov byte [ebp - 4], 4
call fcn.0041d2d0
cmp dword [ebp - 0x138], 0x10
jb 0x40fc09
mov edx, dword [ebp - 0x14c]
push edx
call fcn.004777ca
add esp, 4
mov eax, dword [ebp - 0x190]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004751f1
mov esp, ebp
pop ebp
ret