joyce8/EMBER2024-capa huggingface dataset:
Function at 0x52c640
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x52c79e
push edi
call fcn.0052e710
add esp, 4
test eax, eax
je 0x52c79e
mov eax, dword [ebp + 0x18]
test eax, eax
jle 0x52c79e
mov ecx, dword [edi]
push ebx
xor ebx, ebx
push esi
cmp ecx, 1
jne 0x52c6cb
mov esi, dword [edi + 4]
push eax
call fcn.0052eb02
add esp, 4
mov edi, eax
lea eax, [ebp - 4]
push ebx
push eax
mov eax, dword [ebp + 0x18]
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x52c6ae
push edi
call fcn.0052eb0b
add esp, 4
xor eax, eax
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
push edi
call fcn.0052d1a0
push edi
mov ebx, eax
call fcn.0052eb0b
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
cmp ecx, 2
jne 0x52c71b
mov esi, dword [edi + 4]
add eax, 8
push eax
call fcn.00527a10
mov ebx, eax
add esp, 4
mov eax, dword [ebp + 0x18]
mov ecx, esi
mov dword [ebx + 4], eax
mov dword [ebx], 1
mov edx, dword [esi]
push eax
lea eax, [ebx + 8]
push eax
call dword [edx + 0x20]
test eax, eax
jne 0x52c70f
push ebx
call fcn.00527a80
add esp, 4
xor eax, eax
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov dword [ebx + 4], eax
mov eax, ebx
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
cmp ecx, 3
jne 0x52c795
mov esi, dword [edi + 4]
push eax
call fcn.0052eb02
add esp, 4
mov ebx, eax
mov dword [ebp - 0xc], ebx
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x18]
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x52c769
push ebx
call fcn.0052eb0b
add esp, 4
xor eax, eax
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 4]
lea eax, [edi + 0x10]
push eax
push dword [edi + 0xc]
lea eax, [edi + 0x34]
push eax
push esi
push ebx
push dword [ebp - 8]
call fcn.0052d430
push esi
push ebx
call fcn.0052d1a0
push dword [ebp - 0xc]
mov ebx, eax
call fcn.0052eb0b
add esp, 0x24
pop esi
mov eax, ebx
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x52d3b0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
push edi
xor edi, edi
mov bh, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
cmp dword [ebp + 0xc], edi
jle 0x52d419
push esi
nop dword [eax]
inc bh
movzx esi, bh
mov bl, byte [esi + eax]
add dl, bl
mov byte [ebp + 0x13], dl
movzx edx, dl
movzx ecx, byte [edx + eax]
mov byte [esi + eax], cl
mov byte [edx + eax], bl
movzx ecx, byte [esi + eax]
mov edx, dword [ebp + 8]
add cl, bl
movzx ecx, cl
movzx ecx, byte [ecx + eax]
xor byte [edi + edx], cl
inc edi
mov dl, byte [ebp + 0x13]
cmp edi, dword [ebp + 0xc]
jl 0x52d3d0
pop esi
mov cl, dl
mov byte [eax + 0x100], bh
pop edi
mov byte [eax + 0x101], cl
pop ebx
pop ebp
ret
pop edi
mov byte [eax + 0x100], bh
mov byte [eax + 0x101], dl
pop ebx
pop ebp
ret
Function at 0x52d680
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x5f5580]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x104]
push 0x100
push 0
push eax
mov dword [ebp - 0x108], edi
mov dword [ebp - 0x10c], 0
call fcn.0052fb20
mov esi, edi
lea eax, [ebp - 0x104]
mov edi, dword [ebp + 0xc]
add esp, 0xc
xor ebx, ebx
sub esi, eax
nop
mov eax, ebx
lea ecx, [ebp - 0x104]
cdq
add ecx, ebx
idiv dword [ebp + 0x10]
mov byte [esi + ecx], bl
inc ebx
mov al, byte [edx + edi]
mov byte [ecx], al
cmp ebx, 0x100
jl 0x52d6d0
mov edi, dword [ebp - 0x108]
lea ebx, [ebp - 0x104]
mov esi, edi
mov dword [ebp - 0x108], 0x100
sub ebx, edi
nop dword [eax]
mov dl, byte [esi]
movzx eax, byte [ebx + esi]
add eax, dword [ebp - 0x10c]
movzx ecx, dl
add ecx, eax
and ecx, 0x800000ff
jns 0x52d731
dec ecx
or ecx, 0xffffff00
inc ecx
mov al, byte [edi + ecx]
mov byte [esi], al
inc esi
sub dword [ebp - 0x108], 1
mov dword [ebp - 0x10c], ecx
mov byte [edi + ecx], dl
jne 0x52d710
mov ecx, dword [ebp - 4]
mov word [edi + 0x100], 0
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0052e98f
mov esp, ebp
pop ebp
ret

Function at 0x52f020
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x52f05f
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x52f05f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x52f05f
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x52f05f
cmp dword [ecx + 0x74], 0xe
jbe 0x52f05f
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x53cfb6
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x53d053
push ebx
push esi
call fcn.0053cf7f
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0053cf13
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x53d000
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x53d052
push edi
push eax
call fcn.005395b4
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x53d020
call fcn.0053957a
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x53d051
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0053cf13
add esp, 0x20
test eax, eax
jne 0x53d03f
push edi
call fcn.0053957a
jmp 0x53d047
push ebx
call fcn.0053957a
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x53dd0f
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x547668
push 0x547660
push str.FlsAlloc
push 0x1f
call fcn.0053dc2b
mov esi, eax
add esp, 0x10
test esi, esi
je 0x53dd43
push dword [ebp + 8]
mov ecx, esi
call dword [0x544354]
call esi
jmp 0x53dd49
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x53dd8d
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x547678
push 0x547670
push str.FlsGetValue
push 0x21
call fcn.0053dc2b
mov esi, eax
add esp, 0x10
test esi, esi
je 0x53ddc4
push dword [ebp + 8]
mov ecx, esi
call dword [0x544354]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x53ddcc
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x547680
push 0x547678
push str.FlsSetValue
push 0x22
call fcn.0053dc2b
mov esi, eax
add esp, 0x10
test esi, esi
je 0x53de06
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x544354]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x543a20
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x543a4d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x543a4d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x10002250
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, 0xffffffff
sub esp, 0xc
mov eax, dword [ebp + 8]
lock xadd dword [eax + 4], ebx
sub ebx, 1
je 0x10002278
mov eax, ebx
mov ebx, dword [ebp - 4]
leave
ret 4
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, ebx
mov ebx, dword [ebp - 4]
sub esp, 0xc
leave
ret 4
Function at 0x10002a00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x10002a58
cmp byte [esi + ebx - 1], 0xa
je 0x10002a2c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x10011084], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0x10
pop ebx
pop esi
pop ebp
ret
Function at 0x10003080
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xe0
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [esp], eax
call sym.___wine_dbg_get_channel_flags
movzx eax, al
bt eax, esi
jae 0x10003258
mov edi, dword [0x10011084]
xor eax, eax
mov edx, dword fs:[0x18]
cmp dword [edx + 0x24], edi
je 0x10003167
test byte [0x10004030], 8
jne 0x10003200
lea ebx, [ebp - 0xd4]
mov edi, ebx
test byte [0x10004040], 8
jne 0x100031c0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov dword [esp + 4], str._04x:
mov dword [esp], edi
mov dword [esp + 8], eax
call sym._sprintf
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x10003109
cmp esi, 3
jbe 0x10003178
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov ecx, ebx
mov edi, eax
mov esi, dword [ecx]
add ecx, 4
lea edx, [esi - 0x1010101]
not esi
and edx, esi
and edx, 0x80808080
je 0x1000311a
mov esi, edx
mov dword [esp + 0xc], edi
shr esi, 0x10
test edx, 0x8080
mov dword [esp + 4], 1
cmove edx, esi
lea esi, [ecx + 2]
mov dword [esp], ebx
cmove ecx, esi
mov eax, edx
add al, dl
sbb ecx, 3
sub ecx, ebx
mov dword [esp + 8], ecx
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0xe0
pop ebx
pop esi
pop edi
pop ebp
ret
add eax, edi
mov edi, dword [ebp + 0x10]
mov dword [esp + 8], str._s:_s:_s
mov dword [esp], eax
mov dword [esp + 0x14], edi
mov edi, dword [ebp + 0xc]
lea edx, [edi + 1]
mov dword [esp + 0x10], edx
mov edx, dword [esi*4 + 0x1000ca64]
mov dword [esp + 0xc], edx
mov edx, ebx
sub edx, eax
add edx, 0xc8
mov dword [esp + 4], edx
call sym._snprintf.constprop.0
jmp 0x10003109
mov dword [esp], 0x10004040
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x100030e0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x20]
mov dword [esp], edi
mov dword [esp + 4], str._04x:
mov dword [esp + 8], eax
call sym._sprintf
add edi, eax
jmp 0x100030e0
mov dword [esp], 0x10004030
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x100030cb
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edx, 0x10624dd3
lea ebx, [ebp - 0xd4]
mov dword [esp + 4], str._3u._03u:
mov ecx, eax
mul edx
mov dword [esp], ebx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [esp + 8], edx
sub ecx, eax
mov dword [esp + 0xc], ecx
call sym._sprintf
lea edi, [ebx + eax]
jmp 0x100030d3
mov eax, 0xffffffff
jmp 0x10003167
Function at 0x10003320
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x214
mov eax, dword [0x100110a0]
test eax, eax
je 0x100033d8
mov dword [esp], ebx
call eax
mov dword [ebx + 8], eax
sub esp, 4
test eax, eax
jns 0x10003360
mov eax, dword [ebx]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0x214]
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
mov eax, dword [ebx]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.MODULE
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], str.SystemRoot
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov eax, dword [ebx]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.SystemRoot
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
jmp 0x1000334c
mov dword [esp], str.atl100.dll
call dword [sym.imp.kernel32.dll_LoadLibraryW]
sub esp, 4
test eax, eax
je 0x1000340d
mov dword [esp + 4], str.AtlCreateRegistrar
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [0x100110a0], eax
sub esp, 8
test eax, eax
jne 0x1000333d
mov dword [ebx + 8], 0x80004002
xor eax, eax
jmp 0x1000334e
Function at 0x10003420
Capabilities:
Access peb ldr_data
Extract resource via kernel32 functions
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindResourceW]
sub esp, 0xc
mov dword [ebp - 0x10], eax
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_LoadResource]
mov edx, dword [ebp - 0x10]
sub esp, 8
mov ebx, eax
mov dword [esp + 4], edx
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_SizeofResource]
mov dword [ebp - 0x10], eax
sub esp, 8
test ebx, ebx
je 0x100035b0
mov eax, dword [esi]
test eax, eax
je 0x10003598
mov edx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], ebx
mov dword [esp + 0x14], 0
mov dword [ebp - 0x1c], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call edx
lea ecx, [eax + 1]
sub esp, 0x18
lea eax, [ecx + ecx]
mov dword [ebp - 0x18], ecx
mov ecx, eax
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
mov dword [ebp - 0x14], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
sub esp, 0xc
test eax, eax
mov edi, eax
je 0x100035bc
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [esi + 4]
xor edx, edx
sub esp, 0x18
mov word [edi + eax - 2], dx
mov eax, dword [esi]
test ecx, ecx
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
jne 0x10003588
call dword [edx + 0x28]
mov dword [esi + 8], eax
sub esp, 8
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [esi + 8]
sub esp, 0xc
lea esp, [ebp - 0xc]
not eax
pop ebx
pop esi
shr eax, 0x1f
pop edi
pop ebp
ret 0x10
call dword [edx + 0x24]
mov dword [esi + 8], eax
sub esp, 8
jmp 0x1000354c
mov edx, esi
mov eax, edi
call sym._create_registrar
test eax, eax
jne 0x10003486
lea esi, [esi]
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov dword [esi + 8], 0x8007000e
xor eax, eax
jmp 0x100035b2
Function at 0x412655
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
pushal
call 0x412664
pop dword [ebp - 0x48]
mov eax, 0x412664
sub dword [ebp - 0x48], eax
push 0x40
push 0x1000
push 0x50fd5
push 0
mov eax, 0xc6b1d002
sub eax, 0xc66d1d52
add eax, dword [ebp - 0x48]
call dword [eax]
mov ecx, 0xcc5ac251
sub ecx, 0xcc5a76c8
mov edi, eax
mov ebx, 0xa7dc294d
sub ebx, 0xa794cb4d
add ebx, dword [ebp - 0x48]
mov edx, 0xe6f6cc5a
add edx, 0x521d995d
mov dword [ebp - 0x20], 0x3c743d1b
mov esi, dword [ebx]
mov dword [ebp - 0x30], 0x6feb6753
xor esi, edx
add dword [ebp - 0x28], 0x269c7e85
mov dword [edi], esi
sub dword [ebp - 8], 0xc87f3441
add edi, 0xf41578ea
sub edi, 0xf41578e6
add ebx, 0x5e7c4066
sub ebx, 0x5e7c4062
loop 0x4126be
add eax, 0x82a370c
sub eax, 0x8291615
xor ebx, ebx
add ebx, eax
add eax, 0xba0278d
sub eax, 0xba02788
mov ecx, 0xf9206eca
sub ecx, 0xf8e06eca
add ecx, dword [ebp - 0x48]
call ebx
leave
ret

Function at 0x4400c9
Capabilities:
Encrypt data using dpapi

Disassembly:
push esi
push edi
push 0x46c6d0
push str.AdvApi32.dll
call main
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov esi, eax
test esi, esi
js 0x44010c
push str.SystemFunction040
push dword [0x46c6d0]
call edi
push str.SystemFunction041
push dword [0x46c6d0]
mov dword [0x46c6c0], eax
call edi
mov dword [0x46c6c4], eax
jmp 0x440111
mov eax, dword [0x46c6c4]
cmp dword [0x46c6c0], 0
je 0x440122
test eax, eax
jne 0x4401c9
push 0x46c6d4
push str.Crypt32.dll
call main
mov esi, eax
test esi, esi
js 0x4401d3
push str.CryptProtectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c0], 0
mov dword [0x46c6c8], eax
jne 0x440187
test eax, eax
jne 0x440187
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x440171
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x440178
mov esi, 0x80004005
push esi
push 0x28
push str.c:_agent_work138_s_srclibsdutilcryputil.cpp
call fcn.004038f5
jmp 0x4401d3
push str.CryptUnprotectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c4], 0
mov dword [0x46c6cc], eax
jne 0x4401c9
test eax, eax
jne 0x4401c9
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4401bd
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4401c4
mov esi, 0x80004005
push esi
push 0x2d
jmp 0x44017b
mov dword [0x46c6d8], 1
pop edi
mov eax, esi
pop esi
ret
Function at 0x4012c7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
pushal
call 0x4012d6
pop dword [ebp - 0x18]
mov eax, 0x2fd63d0b
sub eax, 0x2f962a35
sub dword [ebp - 0x18], eax
mov dword [ebp - 0x28], 0xcefe7006
add dword [ebp - 0x28], 0x7f53d545
mov dword [ebp - 0x24], 0x45d8a7aa
add dword [ebp - 0x24], 0xec5aa49b
mov dword [ebp - 0x20], 0x886b7e7f
sub dword [ebp - 0x20], 0x3c1f3a51
mov dword [ebp - 0x1c], 0xd6c03e98
add dword [ebp - 0x1c], 0x293fc168
lea eax, [ebp - 0x28]
push eax
mov eax, 0x975e4d64
sub eax, 0x97189d00
add eax, dword [ebp - 0x18]
call dword [eax]
mov dword [ebp - 0x28], 0xc48c386c
sub dword [ebp - 0x28], 0x5019cf16
mov dword [ebp - 0x24], 0x1cacddfe
add dword [ebp - 0x24], 0x24bf8377
mov dword [ebp - 0x20], 0x22ca32bf
sub dword [ebp - 0x20], 0xbf5ac653
mov dword [ebp - 0x1c], 0x1b3b6489
sub dword [ebp - 0x1c], 0x1b3b6489
lea ebx, [ebp - 0x28]
push ebx
push eax
mov eax, 0xa2dd52d5
add eax, 0x5d685dab
add eax, dword [ebp - 0x18]
call dword [eax]
push 0x40
push 0x1000
push 0x4e714
push 0
call eax
mov ecx, 0x4c46
xor esi, esi
add esi, eax
mov edx, 0x476000
add edx, dword [ebp - 0x18]
mov ebx, 0xa110525a
mov edi, dword [edx]
sub dword [ebp - 0x10], esi
xor edi, ebx
xor dword [ebp - 0xc], eax
mov dword [esi], edi
add dword [ebp - 0xc], 0xc789f86d
add esi, 0x1ee2b7ce
add esi, 0xe11d4836
add edx, 4
loop 0x4013e8
add eax, 0x123eb
xor ebx, ebx
add ebx, eax
add eax, 0x5caee297
add eax, 0xa3511d6e
mov ecx, 0x400000
add ecx, dword [ebp - 0x18]
call ebx
leave
ret
Function at 0x10004080
Capabilities:
Encrypt data using hc-128

Disassembly:
add byte [ebx + 0x458bd455], cl
or byte [ebx - 0x76076fb4], cl
dec esp
nop
clc
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + edx*4 - 0x3c]
mov dword [ebp - 4], ecx

Function at 0x10004df0
Capabilities:
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push 0xf0000000
push 1
push 0
push 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x10004e10
xor eax, eax
jmp 0x100090c7
lea ecx, [ebp - 8]
push ecx
push 0
push 0
push 0x8004
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x10004e32
xor eax, eax
jmp 0x100090e9
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x10004e4e
xor eax, eax
jmp 0x10004eb7
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 4
dec ebp
mov eax, 0x9920e8
add bl, ch
pop ebx
pushfd

Function at 0x10015113
Capabilities:
Read file on windows

Disassembly:
mov ecx, dword [ebp - 0x14]
add ecx, 1
add dword [edi], ecx
xchg edx, eax
sal bh, 0xd8

Function at 0x10015118
Capabilities:
Read file on windows

Disassembly:
add dword [edi], ecx
xchg edx, eax
sal bh, 0xd8
or eax, ecx
push eax
call fcn.100302cc
add esp, 4
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], 0
cmp dword [ebp - 0x10], 0
je fcn.10015151
push 0
lea edx, [ebp - 8]
push edx

Function at 0x10015205
Capabilities:
Write file on windows

Disassembly:
inc eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x10015220
mov eax, 0xa
jmp 0x1001524b
mov dword [ebp - 8], 0
push 0
lea edx, [ebp - 8]

Function at 0x10015f34
Capabilities:
Link many functions at runtime

Disassembly:
add edx, dword [eax]
xor eax, dword [0x10045070]
push str.CreateSemaphoreExW
push esi
mov dword [0x1004624c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
invalid

Function at 0x100160b9
Capabilities:
Link many functions at runtime

Disassembly:
mov al, byte [0x33100350]
add eax, 0x10045070

Function at 0x100160f3
Capabilities:
Link many functions at runtime

Disassembly:
pushal
add edx, dword [eax]
push esi
mov dword [0x10046298], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor eax, dword [0x10045070]
push str.SleepConditionVariableCS
push esi
mov dword [0x1004629c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]

Function at 0x10016638
Capabilities:
Enumerate pe sections

Disassembly:
push esi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
lea edx, [ecx + 0x18]
add edx, eax
movzx eax, word [ecx + 6]
imul esi, eax, 0x28
add esi, edx
cmp edx, esi
je 0x1001666d
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [edx + 0xc]
jb 0x10016666
mov eax, dword [edx + 8]
add eax, dword [edx + 0xc]
cmp ecx, eax
jb 0x10016672
add edx, 0x28
cmp edx, esi
jne 0x10016657
xor eax, eax
pop esi
pop ebp
ret
mov eax, edx
jmp 0x1001666f
Function at 0x10017e67
Capabilities:
Get geographical location

Disassembly:
fadd dword [eax]
mov byte [ebp - 1], 0
cmp dword [edi + 4], 0x80
jg 0x10017e7c
movsx eax, byte [ebx + 8]
jmp 0x10017e7f
mov eax, dword [ebx + 8]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jl 0x10018179
cmp eax, dword [edi + 4]
jge 0x10018179
mov esi, dword [ebp + 8]
cmp dword [esi], 0xe06d7363
jne fcn.10018142
cmp dword [esi + 0x10], 3
jne 0x10017f7b
cmp dword [esi + 0x14], 0x19930520
je 0x10017ecc
cmp dword [esi + 0x14], 0x19930521
je 0x10017ecc
cmp dword [esi + 0x14], 0x19930522
jne 0x10017f7b
cmp dword [esi + 0x1c], 0
jne 0x10017f7b
call fcn.100329de
cmp dword [eax + 0x10], 0
je 0x10018172
call 0x100329ed
mov esi, dword [eax + 0x10]
call fcn.100329f5
mov byte [ebp - 0x28], 1
invalid

Function at 0x1001b29e
Capabilities:
Allocate thread local storage

Disassembly:
movsd dword es:[di], dword [si]
add dword [eax], eax
mov esi, eax
add esp, 0x10
test esi, esi

Function at 0x1001b2fd
Capabilities:
Get thread local storage value

Disassembly:
mov ebp, esp
push esi
push 0x10038410
add edx, dword [eax]
push 0x10038408
push str.FlsGetValue
add edx, dword [eax]

Function at 0x1001b349
Capabilities:
Set thread local storage value

Disassembly:
push 7
call 0x100358b7
add esp, 0x10
mov esi, eax
push dword [ebp + 0xc]
push dword [ebp + 8]
test esi, esi
je 0x1001b36a
mov ecx, esi
call fcn.10031416
call esi
jmp 0x1001b370
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
pop ebp
ret

Function at 0x1001bd7c
Capabilities:
Terminate process

Disassembly:
je 0x1001bd83
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call 0x10036d0f
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x10024dcc
Capabilities:
Terminate process

Disassembly:
add byte [eax], al
mov eax, dword [eax + 0x68]
shr eax, 8
test al, 1
jne 0x10024de8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp + 8]
call 0x1004902f
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ExitProcess]