joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401747
Capabilities:
Create directory
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x40a020]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
mov dword [ebp - 0x10c], 1
call edi
cmp byte [esi + eax - 1], 0x5c
je 0x401786
push 0x407380
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call edi
push 0x104
mov ebx, eax
xor edi, edi
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.00402320
add esp, 0xc
cmp ebx, 2
jle 0x401804
cmp byte [esi + 1], 0x3a
jne 0x401804
test ebx, ebx
jle 0x40180a
lea eax, [ebp - 0x108]
sub esi, eax
cmp dword [ebp - 0x10c], 0
je 0x40180a
lea eax, [ebp + edi - 0x108]
mov cl, byte [esi + eax]
mov byte [eax], cl
cmp cl, 0x5c
jne 0x4017fd
cmp edi, 2
je 0x4017fd
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x4017fd
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov dword [ebp - 0x10c], eax
inc edi
cmp edi, ebx
jl 0x4017b9
jmp 0x40180a
mov dword [ebp - 0x10c], edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040239a
leave
ret 4
Function at 0x401f7a
Capabilities:
Delete directory
Delete file
Move file

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
call fcn.0040121e
mov ecx, esi
call fcn.00401233
mov ebx, eax
xor edi, edi
cmp ebx, edi
jne 0x401fc3
mov ecx, esi
call fcn.0040188b
mov ebx, eax
cmp ebx, edi
jne 0x401fc3
mov ecx, esi
call fcn.004014ce
mov ebx, eax
cmp ebx, edi
jne 0x401fc3
mov ecx, esi
call fcn.004015e0
mov ebx, eax
cmp ebx, edi
jne 0x401fc3
mov ecx, esi
call fcn.00401b8c
mov ebx, eax
cmp dword [0x40ab80], edi
jne 0x402028
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esi + 0x1224]
cmp dword [esi + 0x110c], edi
je 0x402002
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push eax
call edi
lea eax, [esi + 0x142c]
push eax
call edi
add esi, 0x1328
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x402028
push 5
push edi
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push eax
call edi
push 5
push 0
lea eax, [esi + 0x142c]
push eax
call edi
push 5
push 0
add esi, 0x1328
push esi
call edi
pop edi
pop esi
mov eax, ebx
pop ebx
ret

Function at 0x40239a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40a020]
jne 0x4023a4
repz ret
jmp fcn.00403c67
Function at 0x40563b
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x40a020]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00402fd6
and dword [ebp - 0x14], 0
cmp dword [0x40b7d8], 0
mov dword [ebp - 0x18], eax
jne 0x4056ee
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x405796
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x405796
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x40b7d8], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x40b7dc], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x40b7e0], eax
call edi
push eax
call esi
mov dword [0x40b7e8], eax
test eax, eax
je 0x4056ee
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x40b7e4], eax
mov eax, dword [0x40b7e4]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x405747
cmp dword [0x40b7e8], ecx
je 0x405747
push eax
call esi
push dword [0x40b7e8]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x405747
test ebx, ebx
je 0x405747
call edi
test eax, eax
je 0x40573e
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x40573e
test byte [ebp - 8], 1
jne 0x405747
or dword [ebp + 0x10], 0x200000
jmp 0x40577a
mov eax, dword [0x40b7dc]
cmp eax, dword [ebp - 0x18]
je 0x40577a
push eax
call esi
test eax, eax
je 0x40577a
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40577a
mov eax, dword [0x40b7e0]
cmp eax, dword [ebp - 0x18]
je 0x40577a
push eax
call esi
test eax, eax
je 0x40577a
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x40b7d8]
call esi
test eax, eax
je 0x405796
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x405798
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040239a
leave
ret
Function at 0x401080
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x13c
mov eax, dword [0x404008]
xor eax, esp
mov dword [esp + 0x138], eax
push esi
lea eax, [esp + 8]
mov dword [esp + 4], 0
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionOpenWith
xorps xmm0, xmm0
mov dword [esp + 0x18], 0
push reloc.OLEAUT32.dll_SysReAllocString
movaps xmmword [esp + 0x34], xmm0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401191
mov esi, dword [esp + 8]
test esi, esi
je 0x401191
push pe_nt_image_headers32
push eax
lea eax, [esp + 0x40]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x1c], pe_nt_image_headers32
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x3c]
push eax
push 0
push 0
push 0x403224
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esp + 8]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x401191
lea ecx, [esp + 0x38]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401130
sub ecx, edx
sar ecx, 1
cmp ecx, 0x26
jne 0x401191
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.ole32.dll_CLSIDFromString]
test eax, eax
js 0x401191
lea eax, [esp + 4]
mov dword [esp + 0xc], 0x6a283fe2
push eax
lea eax, [esp + 0x10]
mov dword [esp + 0x14], 0x4599ecfa
push eax
push 4
push 0
lea eax, [esp + 0x30]
mov dword [esp + 0x24], 0x9e8c491
push eax
mov dword [esp + 0x2c], 0x267b1357
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ecx, dword [esp + 0x13c]
mov eax, dword [esp + 4]
pop esi
xor ecx, esp
call fcn.004012f0
mov esp, ebp
pop ebp
ret

Function at 0x4011b0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push 2
push 0
mov dword [ebp - 4], eax
call dword [sym.imp.ole32.dll_CoInitializeEx]
call fcn.00401080
mov ebx, eax
push 0
push ebx
call dword [sym.imp.ole32.dll_CoAllowSetForegroundWindow]
push str..pdf
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov esi, eax
test esi, esi
je 0x401232
mov edi, dword [ebx]
push 4
push esi
push dword [ebp - 4]
mov edi, dword [edi + 0xc]
mov ecx, edi
push ebx
call dword [0x403110]
call edi
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebx]
push ebx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x403110]
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x8007000e
call fcn.00401030
int3
Function at 0x40d6f8
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x14], 0
and dword [eax + 0x10], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret 4

Function at 0x40e4c4
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
lea edi, [ecx + 4]
mov dword [ebp - 0xc], ecx
mov dword [ecx], 0x4230d0
xor edx, edx
xor eax, eax
mov ecx, edi
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e4df
mov byte [edi + 0x100], dl
mov byte [edi + 0x101], dl
xor ebx, ebx
mov ecx, edi
mov dword [ebp - 8], 0x100
mov al, byte [ecx]
movzx esi, dl
mov edx, dword [ebp + 8]
mov byte [ebp - 1], al
movzx eax, al
movzx edx, byte [esi + edx]
add ebx, edx
add eax, ebx
mov ebx, 0x100
cdq
idiv ebx
movzx ebx, dl
mov al, byte [ebx + edi]
mov byte [ecx], al
mov al, byte [ebp - 1]
mov byte [ebx + edi], al
lea eax, [esi + 1]
cdq
idiv dword [ebp + 0xc]
inc ecx
dec dword [ebp - 8]
jne 0x40e500
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x40e566
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0xc], 0
mov al, byte [ecx + 0x104]
mov dl, byte [ecx + 0x105]
jbe 0x40e60a
push ebx
push esi
push edi
movzx edi, al
movzx ebx, dl
jmp 0x40e594
mov ebx, dword [ebp - 0xc]
lea eax, [edi + 1]
mov esi, 0x100
cdq
idiv esi
movzx edi, dl
mov al, byte [edi + ecx + 4]
mov byte [ebp - 2], dl
lea esi, [edi + ecx + 4]
mov byte [ebp - 1], al
movzx eax, al
add eax, ebx
mov ebx, 0x100
cdq
idiv ebx
mov ebx, dword [ebp - 8]
movzx eax, dl
mov dword [ebp - 0xc], eax
mov byte [ebp - 3], dl
mov dl, byte [eax + ecx + 4]
lea eax, [eax + ecx + 4]
mov byte [esi], dl
mov dl, byte [ebp - 1]
mov byte [eax], dl
mov eax, dword [ebp + 8]
add ebx, eax
movzx eax, byte [esi]
movzx edx, dl
add eax, edx
mov esi, 0x100
cdq
idiv esi
movzx eax, dl
mov al, byte [eax + ecx + 4]
xor byte [ebx], al
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jb 0x40e591
mov al, byte [ebp - 2]
mov dl, byte [ebp - 3]
pop edi
pop esi
pop ebx
push 1
mov byte [ecx + 0x104], al
mov byte [ecx + 0x105], dl
pop eax
leave
ret 8
Function at 0x40f2a0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov eax, 0x421c43
call fcn.00420f90
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
call fcn.00410415
xor edi, edi
mov dword [esi + 0x1c], 0xa
mov dword [ebp - 4], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0xc], edi
mov dword [esi + 8], edi
mov dword [esi + 0x18], edi
mov ebx, dword [ebp + 8]
mov byte [ebp - 4], 1
mov dword [esi], 0x4230e0
mov dword [esi + 0x30], ebx
call fcn.004173f8
push edi
mov dword [esi + 4], eax
push dword [ebp + 0xc]
push ebx
push eax
call fcn.0041741f
push 8
call sub.MFC42.DLL_operatornew
mov dword [esi + 0x24], eax
mov ecx, dword [0x42941c]
mov dword [eax], ecx
mov eax, dword [esi + 0x24]
mov ecx, dword [ebp - 0xc]
add esp, 0x14
mov dword [eax + 4], esi
mov dword [esi + 0x20], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x4010ee
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
and dword [ebp - 0x12c], 0
and dword [ebp - 0x130], 0
push 0x128
push 0
lea eax, [ebp - 0x128]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x128], 0x128
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x128]
push eax
push dword [ebp - 0x130]
call sub.KERNEL32.dll_Process32First
push dword [ebp + 8]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x401168
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x12c], eax
jmp 0x40117e
lea eax, [ebp - 0x128]
push eax
push dword [ebp - 0x130]
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x401146
push dword [ebp - 0x130]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x12c]
leave
ret 4
Function at 0x401441
Capabilities:
Contain obfuscated stackstrings
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov dword [ebp - 0x14], 1
and dword [ebp - 0x10], 0
and dword [ebp - 0x1c], 0
and dword [ebp - 0x20], 0
and dword [ebp - 0x44], 0
and dword [ebp - 4], 0
and dword [ebp - 0xc], 0
or dword [ebp - 0x18], 0xffffffff
and dword [ebp - 8], 0
mov dword [ebp - 0x40], 0x64616f4c
mov dword [ebp - 0x3c], 0x6f736552
mov dword [ebp - 0x38], 0x65637275
and dword [ebp - 0x34], 0
lea eax, [ebp - 0x40]
push eax
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 8], eax
push 0x4082d8
movzx eax, word [ebp + 0x10]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x20]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 4], eax
push dword [ebp - 0x20]
push dword [ebp + 0xc]
call dword [ebp - 8]
mov dword [ebp - 0x44], eax
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp dword [ebp + 0x10], 0x65
jne 0x4014e7
mov dword [ebp - 0x1c], 0xc6f
cmp dword [ebp + 0x10], 0x66
jne 0x4014f4
mov dword [ebp - 0x1c], 0x145
push dword [ebp - 4]
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x10], eax
push dword [ebp - 4]
push dword [ebp - 0x44]
push dword [ebp - 0x10]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 0
push dword [ebp - 0x1c]
push dword [ebp - 4]
push dword [ebp - 0x10]
call fcn.00401000
push 0
push dword [ebp + 0x14]
push 2
push 0
push 3
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x401551
and dword [ebp - 0x14], 0
jmp 0x401566
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
push dword [ebp - 0x10]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x10], 0
je 0x40157b
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x4c], eax
push dword [ebp - 0x4c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x44], 0
je 0x40158a
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [ebp - 0x18], 0xffffffff
je 0x401599
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
leave
ret 0x10
Function at 0x4015a0
Capabilities:
Delete file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov dword [ebp - 0x118], 3
and dword [ebp - 4], 0
and dword [ebp - 0x11c], 0
or dword [ebp - 0x114], 0xffffffff
cmp dword [ebp + 8], 0
je 0x4015d5
mov dword [ebp - 0x118], 2
push 0
push 0x80
push dword [ebp - 0x118]
push 0
push 3
push 0xc0000000
push str.C:DelInfo.bin
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0xffffffff
jne 0x401617
and dword [ebp - 0x11c], 0
mov eax, dword [ebp - 0x11c]
jmp 0x401708
cmp dword [ebp + 8], 0
je 0x401665
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp + 8]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401702
push 0x104
push 0
lea eax, [ebp - 0x110]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
lea eax, [ebp - 4]
push eax
push 0x104
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0xb
jbe 0x4016eb
and dword [ebp - 0x120], 0
jmp 0x4016c1
mov eax, dword [ebp - 0x120]
inc eax
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0xc8
jge 0x4016eb
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp eax, 1
jne 0x4016e1
jmp 0x4016eb
push 0x1e
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4016b4
push str.C:DelInfo.bin
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp - 0x11c]
leave
ret 8
Function at 0x40189c
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48c
and dword [ebp - 0x48], 0
and dword [ebp - 0x44], 0
push 0x400
push 0
lea eax, [ebp - 0x488]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
and dword [ebp - 0x48c], 0
jmp 0x4018d9
mov eax, dword [ebp - 0x48c]
inc eax
mov dword [ebp - 0x48c], eax
cmp dword [ebp - 0x48c], 0x12
jge 0x401920
push dword [ebp - 0x48c]
push 1
push 0x40
lea eax, [ebp - 0x88]
push eax
call fcn.0040174a
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40191e
push dword [ebp - 0x48c]
push 0
push 0x40
lea eax, [ebp - 0x40]
push eax
call fcn.0040174a
mov dword [ebp - 0x48], eax
jmp 0x401920
jmp 0x4018cc
cmp dword [ebp - 0x48], 0
jne 0x40192c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x48], eax
cmp dword [ebp + 0xc], 0
je 0x40193e
push dword [ebp - 0x48]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp - 0x48]
push dword [0x40a540]
push 0x408434
lea eax, [ebp - 0x488]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x44]
push eax
push 0x2001f
push 0
lea eax, [ebp - 0x488]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 4
lea eax, [ebp + 0x10]
push eax
push 4
push 0
push str.Start
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret 0xc

Function at 0x40199e
Capabilities:
Check for time delay via gettickcount
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
and dword [ebp - 0x194], 0
and dword [ebp - 0x198], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x194], eax
lea eax, [ebp - 0x190]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
lea eax, [ebp - 0x198]
push eax
push 0
push 0
push str.www.baidu.com
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x401a15
cmp dword [ebp + 8], 0xffffffff
je 0x401a08
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x194]
cmp eax, dword [ebp + 8]
jb 0x401a08
xor eax, eax
jmp 0x401a2a
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4019d3
push dword [ebp - 0x198]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
inc eax
leave
ret 4
Function at 0x401aae
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
and dword [ebp - 0x11c], 0
or dword [ebp - 0xc], 0xffffffff
and dword [ebp - 8], 0
and dword [ebp - 4], 0
push 0x104
push 0
lea eax, [ebp - 0x118]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x118]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
and dword [ebp - 0x120], 0
jmp 0x401b0b
mov eax, dword [ebp - 0x120]
inc eax
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0x32
jge 0x401b45
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x401b3b
jmp 0x401b45
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401afe
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x401b5f
cmp dword [ebp - 8], 0xffffffff
jne 0x401b7b
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
and dword [eax], 0
mov eax, dword [ebp + 0x10]
and dword [eax], 0
xor eax, eax
jmp 0x401c2c
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, dword [ebp - 8]
add eax, 0x20
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x124], eax
mov eax, dword [ebp - 0x124]
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x11c]
mov dword [eax], ecx
mov eax, dword [ebp - 8]
add eax, 0x20
push eax
push 0
push dword [ebp - 0x11c]
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push dword [ebp - 0x11c]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x11c]
mov ecx, dword [ebp - 0x11c]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 8], 0
je 0x401c16
mov eax, dword [ebp - 0x10]
movzx eax, word [eax + 0x16]
and eax, 0xdfff
mov ecx, dword [ebp - 0x10]
mov word [ecx + 0x16], ax
jmp 0x401c29
mov eax, dword [ebp - 0x10]
movzx eax, word [eax + 0x16]
or eax, 0x2000
mov ecx, dword [ebp - 0x10]
mov word [ecx + 0x16], ax
xor eax, eax
inc eax
leave
ret 0xc
Function at 0x401c30
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
and dword [ebp - 8], 0
and dword [ebp - 4], 0
push 0x400
push 0
lea eax, [ebp - 0x408]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp + 8]
push str.SYSTEMCurrentControlSetServices_s
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 4]
push eax
push 0x2001f
push 0
lea eax, [ebp - 0x408]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.Parameters
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp + 0xc]
push 2
push 0
push str.ServiceDll
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret 8