Function at 0x100060f0
Capabilities:
Create process on windows
Delete registry value
Enumerate processes
Extract resource via kernel32 functions
Get common file path
Query or enumerate registry value
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10029bfb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2a8
mov eax, dword [0x10035a8c]
push ebx
push esi
push edi
mov dword [esp + 0x2ac], eax
lea eax, [esp + 0xc]
push eax
push 0x1002bff0
xor ebx, ebx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x18], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov ecx, dword [esp + 0xc]
push 0x1002bfe4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x1a0]
rep stosd dword es:[edi], eax
push 0x104
lea eax, [esp + 0x1a4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100065db
lea edi, [esp + 0x1a0]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10006190
mov ecx, dword [str.GetDesktopPath.exe]
mov edx, dword [0x1002c1e4]
mov eax, dword [0x1002c1e8]
mov dword [edi], ecx
mov ecx, dword [0x1002c1ec]
mov dword [edi + 4], edx
mov edx, dword [0x1002c1f0]
mov dword [edi + 8], eax
lea eax, [esp + 0x1a0]
mov dword [edi + 0xc], ecx
push ebx
push eax
mov dword [edi + 0x10], edx
call fcn.10012fed
add esp, 8
cmp eax, 0xffffffff
jne 0x100062f6
mov dword [esp + 0xc], ebx
call fcn.1002755e
mov eax, dword [eax + 8]
push str.ExecuteFile
push 0xcc
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
cmp esi, ebx
jne 0x1000622f
push 0x51
push 0x5c
push str..EnvironmentVariable.cpp
call fcn.10012fc0
add esp, 8
inc eax
push eax
push str._s:_d
call fcn.10007550
push str._SD__Init_state:_Find_resource_failed.
call fcn.10007550
add esp, 0x10
jmp 0x100065db
call fcn.1002755e
mov eax, dword [eax + 8]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
call fcn.1002755e
mov eax, dword [eax + 8]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x10006286
push 0x59
push 0x5c
push str..EnvironmentVariable.cpp
call fcn.10012fc0
add esp, 8
inc eax
push eax
push str._s:_d
call fcn.10007550
push str._SD__Init_state:_Load_resource_failed.
call fcn.10007550
add esp, 0x10
jmp 0x100065db
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea ecx, [esp + 0x1b8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
test edi, edi
jne 0x100062d8
push 0x60
push 0x5c
push str..EnvironmentVariable.cpp
call fcn.10012fc0
add esp, 8
inc eax
push eax
push str._s:_d
call fcn.10007550
push str._SD__Init_state:_create_resource_file_failed..
call fcn.10007550
add esp, 0x10
jmp 0x100065db
push 0
lea edx, [esp + 0x10]
push edx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 2
mov dword [esp + 0x80], 0x128
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
lea eax, [esp + 0x78]
push eax
push ebx
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x100064cb
nop
lea edi, [esp + 0x9c]
mov esi, str.explorer.exe
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x10006390
lea edi, [esp + 0x9c]
mov esi, str.Explorer.exe
mov ecx, 0xd
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10006390
lea edi, [esp + 0x9c]
mov esi, str.Explorer.EXE
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x10006390
lea edi, [esp + 0x9c]
mov esi, str.EXPLORER.EXE
mov ecx, 0xd
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10006390
lea ecx, [esp + 0x78]
push ecx
push ebx
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x10006320
jmp 0x100064cb
mov edx, dword [esp + 0x80]
push edx
push 0
push 0x1f0fff
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x100064cb
push 0x84
push 0x5c
push str..EnvironmentVariable.cpp
call fcn.10012fc0
add esp, 8
inc eax
push eax
push str._s:_d
call fcn.10007550
push str._SD__Test_state:_Open_process_explorer_ok.
call fcn.10007550
add esp, 0x10
lea eax, [esp + 0xc]
push eax
push 0xf00ff
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x100064cb
push 0x88
push 0x5c
push str..EnvironmentVariable.cpp
call fcn.10012fc0
add esp, 8
inc eax
push eax
push str._s:_d
call fcn.10007550
push str._SD__Test_state:_get_process_token_ok.
call fcn.10007550
xor eax, eax
add esp, 0x10
mov ecx, 0x11
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
push eax
push eax
push eax
push eax
push eax
push 0x1002c0f8
push eax
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x100065db
push 0x8f
push 0x5c
push str..EnvironmentVariable.cpp
call fcn.10012fc0
add esp, 8
inc eax
push eax
push str._s:_d
call fcn.10007550
push str._SD__Test_state:_create_process__ok_with_the_token.
call fcn.10007550
mov ecx, dword [esp + 0x30]
add esp, 0x10
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x92
push 0x5c
push str..EnvironmentVariable.cpp
call fcn.10012fc0
add esp, 8
inc eax
push eax
push str._s:_d
call fcn.10007550
push str._SD__Test_state:_wait_GetDesktopPath.exe_process__ok.
call fcn.10007550
add esp, 0x10
lea edx, [esp + 0x10]
push edx
push 0x1002bff0
xor esi, esi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], 1
mov dword [esp + 0x1c], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x1c]
push eax
push esi
lea ecx, [esp + 0x20]
push ecx
push esi
push 0x1002bfe4
push edx
call edi
test eax, eax
jne 0x100065d0
mov esi, dword [ebp + 8]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push esi
lea ecx, [esp + 0x20]
push ecx
push 0
push 0x1002bfe4
push edx
call edi
test eax, eax
jne 0x100065d0
push 0x1002b599
lea ecx, [esp + 0x18]
call fcn.10002a00
push esi
lea eax, [esp + 0x18]
push str._SD__Test_state:_desktop_path:__s
push eax
mov dword [esp + 0x2c8], 0
call fcn.100029a0
add esp, 0xc
push 0xac
push 0x5c
push str..EnvironmentVariable.cpp
call fcn.10012fc0
add esp, 8
inc eax
push eax
push str._s:_d
call fcn.10007550
mov ecx, dword [esp + 0x20]
push ecx
call fcn.10007550
mov edx, dword [esp + 0x20]
add esp, 0x10
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x2bc], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100065c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 1
jmp 0x100065dd
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [esp + 0x2b4]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x2ac]
call fcn.1001291b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4