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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48d49b
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x4b8914]
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.00473a10
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 0x40c030
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 0x40bfd5
sub eax, edx
push eax
lea edx, [ebp - 0x114]
push edx
lea ecx, [ebp - 0x130]
call fcn.004010b2
lea eax, [ebp - 0x130]
push eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x18c], 3
call fcn.0040f530
add esp, 4
test al, al
je 0x40c030
lea ecx, [ebp - 0x114]
push str.systemprofile
push ecx
call fcn.004114c0
add esp, 8
mov byte [ebp - 0x185], 1
test eax, eax
je 0x40c036
mov byte [ebp - 0x185], bl
test byte [ebp - 0x18c], 2
mov dword [ebp - 4], ebx
je 0x40c061
and dword [ebp - 0x18c], 0xfffffffd
cmp dword [ebp - 0x11c], 0x10
jb 0x40c061
mov edx, dword [ebp - 0x130]
push edx
call fcn.00471f65
add esp, 4
cmp byte [ebp - 0x185], bl
je 0x40c093
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40c072
mov ecx, dword [ebp - 0x190]
sub eax, edx
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.004010b2
jmp 0x40c769
lea ecx, [ebp - 0x114]
push ecx
push str.UBASE::OsDesktopDir
push str.__s___Error__SHGetSpecialFolderPathA:__s
call fcn.004190e0
push 0x104
lea edx, [ebp - 0x114]
push ebx
push edx
call fcn.00473a10
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 0x40c152
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 0x40c0f6
sub eax, edx
push eax
lea ecx, [ebp - 0x114]
push ecx
lea ecx, [ebp - 0x130]
call fcn.004010b2
or dword [ebp - 0x18c], 4
lea edx, [ebp - 0x130]
push edx
mov dword [ebp - 4], 2
call fcn.0040f530
add esp, 4
test al, al
je 0x40c152
lea eax, [ebp - 0x114]
push str.systemprofile
push eax
call fcn.004114c0
add esp, 8
mov byte [ebp - 0x185], 1
test eax, eax
je 0x40c158
mov byte [ebp - 0x185], bl
test byte [ebp - 0x18c], 4
mov dword [ebp - 4], ebx
je 0x40c183
and dword [ebp - 0x18c], 0xfffffffb
cmp dword [ebp - 0x11c], 0x10
jb 0x40c183
mov ecx, dword [ebp - 0x130]
push ecx
call fcn.00471f65
add esp, 4
lea eax, [ebp - 0x114]
cmp byte [ebp - 0x185], bl
je 0x40c1b5
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40c194
mov ecx, dword [ebp - 0x190]
sub eax, edx
push eax
lea edx, [ebp - 0x114]
push edx
call fcn.004010b2
jmp 0x40c769
push eax
push str.UBASE::OsDesktopDir
push str.__s___Error__USERPROFILEDesktop:__s
call fcn.004190e0
push 0x104
lea ecx, [ebp - 0x114]
push ebx
push ecx
call fcn.00473a10
add esp, 0x18
push 0x103
lea edx, [ebp - 0x114]
push edx
push str._USERPROFILE__
call edi
test eax, eax
je 0x40c26c
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 0x40c210
sub eax, edx
push eax
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x130]
call fcn.004010b2
or dword [ebp - 0x18c], 8
lea ecx, [ebp - 0x130]
push ecx
mov dword [ebp - 4], 3
call fcn.0040f530
add esp, 4
test al, al
je 0x40c26c
lea edx, [ebp - 0x114]
push str.systemprofile
push edx
call fcn.004114c0
add esp, 8
mov byte [ebp - 0x185], 1
test eax, eax
je 0x40c272
mov byte [ebp - 0x185], bl
test byte [ebp - 0x18c], 8
mov dword [ebp - 4], ebx
mov edi, 0x10
je 0x40c2a1
and dword [ebp - 0x18c], 0xfffffff7
cmp dword [ebp - 0x11c], edi
jb 0x40c2a1
mov eax, dword [ebp - 0x130]
push eax
call fcn.00471f65
add esp, 4
cmp byte [ebp - 0x185], bl
je 0x40c2d3
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40c2b2
sub eax, edx
push eax
lea ecx, [ebp - 0x114]
push ecx
mov ecx, dword [ebp - 0x190]
call fcn.004010b2
jmp 0x40c769
lea edx, [ebp - 0x114]
push edx
push str.UBASE::OsDesktopDir
push str.__s___Error__USERPROFILE_
call fcn.004190e0
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.0041a300
lea eax, [ebp - 0x14c]
push eax
push str.Desktop
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 5
call fcn.00419460
cmp dword [ebp - 0x13c], ebx
je 0x40c397
mov eax, dword [ebp - 0x14c]
cmp dword [ebp - 0x138], edi
jae 0x40c356
lea eax, [ebp - 0x14c]
push str.systemprofile
push eax
call fcn.004114c0
add esp, 8
test eax, eax
jne 0x40c397
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0x14c]
push ecx
mov ecx, dword [ebp - 0x190]
call fcn.00401127
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 4
call fcn.0041a270
cmp dword [ebp - 0x138], edi
jmp 0x40c758
mov eax, dword [ebp - 0x14c]
cmp dword [ebp - 0x138], edi
jae 0x40c3ab
lea eax, [ebp - 0x14c]
push eax
push str.UBASE::OsDesktopDir
push str.__s___Error__Regedit_Shell_Folders:__s
call fcn.004190e0
lea eax, [ebp - 0x184]
push eax
call fcn.0040ace0
add esp, 0x10
cmp dword [ebp - 0x174], ebx
jne 0x40c415
cmp dword [ebp - 0x170], edi
jb 0x40c3e9
mov ecx, dword [ebp - 0x184]
push ecx
call fcn.00471f65
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.0041a270
cmp dword [ebp - 0x138], edi
jmp 0x40c758
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.004010b2
lea eax, [ebp - 0x168]
push eax
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 8
call fcn.00406dd6
mov byte [ebp - 4], 7
cmp dword [ebp - 0x154], edi
jb 0x40c480
mov ecx, dword [ebp - 0x168]
push ecx
call fcn.00471f65
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.004010b2
lea edx, [ebp - 0x168]
push edx
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 9
call fcn.00406dd6
mov byte [ebp - 4], 7
cmp dword [ebp - 0x154], edi
jb 0x40c4d5
mov eax, dword [ebp - 0x168]
push eax
call fcn.00471f65
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.004010b2
lea ecx, [ebp - 0x168]
push ecx
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 0xa
call fcn.00406dd6
mov byte [ebp - 4], 7
cmp dword [ebp - 0x154], edi
jb 0x40c529
mov edx, dword [ebp - 0x168]
push edx
call fcn.00471f65
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.004010b2
lea eax, [ebp - 0x168]
push eax
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 0xb
call fcn.00406dd6
mov byte [ebp - 4], 7
cmp dword [ebp - 0x154], edi
jb 0x40c57e
mov ecx, dword [ebp - 0x168]
push ecx
call fcn.00471f65
add esp, 4
mov edi, dword [ebp - 0x124]
cmp edi, dword [ebp - 0x120]
je 0x40c6c6
mov ecx, dword [ebp - 0x184]
mov eax, 0x10
cmp dword [ebp - 0x170], eax
jae 0x40c5a9
lea ecx, [ebp - 0x184]
cmp dword [edi + 0x14], eax
jb 0x40c5b2
mov eax, dword [edi]
jmp 0x40c5b4
mov eax, edi
push ecx
push eax
lea edx, [ebp - 0x168]
push edx
call fcn.00413050
add esp, 0xc
mov esi, eax
lea eax, [ebp - 0x14c]
cmp eax, esi
je 0x40c644
cmp dword [ebp - 0x138], 0x10
jb 0x40c5e9
mov ecx, dword [ebp - 0x14c]
push ecx
call fcn.00471f65
add esp, 4
mov dword [ebp - 0x138], 0xf
mov dword [ebp - 0x13c], ebx
mov byte [ebp - 0x14c], bl
cmp dword [esi + 0x14], 0x10
jae 0x40c61c
mov eax, dword [esi + 0x10]
inc eax
push eax
lea edx, [ebp - 0x14c]
push esi
push edx
call fcn.00471a30
add esp, 0xc
jmp 0x40c626
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 0x40c660
mov eax, dword [ebp - 0x168]
push eax
call fcn.00471f65
add esp, 4
lea ecx, [ebp - 0x14c]
push ecx
call fcn.0040f530
add esp, 4
test al, al
jne 0x40c6ac
cmp dword [ebp - 0x138], 0x10
mov eax, dword [ebp - 0x14c]
jae 0x40c688
lea eax, [ebp - 0x14c]
push eax
push str.UBASE::OsDesktopDir
push str.__s___Error__Attempt_access_failed:__s
call fcn.004190e0
add edi, 0x1c
add esp, 0xc
cmp edi, dword [ebp - 0x120]
jne 0x40c590
jmp 0x40c6c1
mov ecx, dword [ebp - 0x190]
push 0xffffffffffffffff
push ebx
lea edx, [ebp - 0x14c]
push edx
call fcn.00401127
mov esi, 0xf
cmp dword [ebp - 0x124], ebx
je 0x40c718
mov esi, dword [ebp - 0x124]
mov edi, dword [ebp - 0x120]
cmp esi, edi
je 0x40c704
mov edi, edi
cmp dword [esi + 0x14], 0x10
jb 0x40c6f1
mov eax, dword [esi]
push eax
call fcn.00471f65
add esp, 4
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov byte [esi], bl
add esi, 0x1c
cmp esi, edi
jne 0x40c6e0
mov eax, dword [ebp - 0x124]
push eax
call fcn.00471f65
add esp, 4
mov esi, 0xf
cmp dword [ebp - 0x170], 0x10
jb 0x40c730
mov ecx, dword [ebp - 0x184]
push ecx
call fcn.00471f65
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.0041a270
cmp dword [ebp - 0x138], 0x10
jb 0x40c769
mov edx, dword [ebp - 0x14c]
push edx
call fcn.00471f65
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.00471528
mov esp, ebp
pop ebp
ret