joyce8/EMBER2024-capa huggingface dataset:
Function at 0x44a100
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x48cda3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.0047fbcb
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], method.CBrush.virtual_0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.0048526a
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.00486786
test eax, eax
je 0x44a21c
mov ecx, dword [esp + 0x3c]
call fcn.00485297
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x44a1e0
push edi
mov ecx, esi
call fcn.004828f8
mov ecx, esi
call fcn.0044a3c0
cmp dword [esp + 0x38], 1
jne 0x44a215
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.00482a33
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x44c440
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x44c473
push esi
call fcn.0045a7e0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x44c46c
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x44c4f9
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x44c4e2
mov eax, dword [esi + 8]
test eax, eax
je 0x44c497
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x44c4de
cmp eax, 2
je 0x44c4e2
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x44c48a
cmp eax, 3
je 0x44c4bd
cmp eax, 1
jne 0x44c48a
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x44c48a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x44c48a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.0044c520
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x44c508
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.0044c520
add esp, 4
pop esi
ret

Function at 0x44cd90
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x44cdb1
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x44cdb1
mov eax, dword [eax + 0x44]
test eax, eax
je 0x44cdb1
mov edx, dword [esp + 8]
push edx
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]

Function at 0x467290
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x4672f6
mov ebx, dword [sym.imp.KERNEL32.DLL_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x4672f6
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x4672d7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret

Function at 0x467680
Capabilities:
Create http request

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x4676b8
mov edx, dword [esi + 4]
xor eax, eax
push 0
push 0
mov ecx, dword [edx - 8]
test ecx, ecx
setne al
mov ecx, eax
neg ecx
sbb ecx, ecx
and ecx, edx
neg eax
sbb eax, eax
push ecx
and eax, 2
inc eax
push eax
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.0_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi], eax
mov ecx, dword [esi]
xor eax, eax
test ecx, ecx
setne al
pop esi
ret
Function at 0x4682e0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x468329
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x4687a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x48d2f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.00468350
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.004683d0
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.004683d0
lea ecx, [esi + 0xc]
call fcn.0047e5a8
lea ecx, [esi + 0x10]
call fcn.0047e5a8
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.00469960
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.00469960
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.00469960
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.0047e61d
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.0047e61d
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x46a500
Capabilities:
Capture webcam image

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov eax, dword [eax + 4]
cmp dword [esi + 0xec], 1
jne 0x46a5a3
test eax, eax
jbe 0x46a5a3
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x46a5a3
mov ecx, dword [esi + 0x1c]
push edi
push 0
push eax
push 0x419
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [esi + 0xbc]
inc edi
test eax, eax
jne 0x46a54e
xor esi, esi
jmp 0x46a554
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x46a57f
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.0046c580
add esi, eax
push esi
mov ebx, esi
call fcn.0046c580
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x46a560
pop ebp
test edi, edi
pop edi
jne 0x46a5a3
test ebx, ebx
je 0x46a5a3
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.0046ebe0
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc

Function at 0x46a705
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x46a81d
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x46a81d
mov eax, dword [esi + 0x3c]
push eax
call fcn.0048001d
mov esi, eax
test esi, esi
je 0x46a81d
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x46a81d
mov ecx, esi
call fcn.0046a690
cmp edi, eax
jge 0x46a81d
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x46a7a3
mov dword [esp + 0x34], 1
jmp 0x46a7fe
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x46a81d
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.00469c40
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc
Function at 0x4809c1
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4809f9
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0047ea78
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0047ea50
jmp 0x480a05
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4820b2
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4820f4
call fcn.00487e2c
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
cmp eax, edi
je 0x4820f4
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
cmp eax, edi
jne 0x4820eb
xor eax, eax
jmp 0x4820fc
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00482102
pop edi
pop esi
pop ebx
ret 4

Function at 0x48835c
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x48838a
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
test eax, eax
je 0x4883a8
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004882c2
jmp 0x4883a8
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4883a8
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004882c2
test edi, edi
mov eax, edi
jne 0x488392
pop edi
push ebx
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x9585f0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x95e4cc]
cmp dword [eax + 0x28], 0
jne 0x958608
xor eax, eax
jmp 0x958737
mov ecx, dword [0x95e43c]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
add edx, 0xe
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
mov dword [0x95e430], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
mov dword [0x95e42c], eax
push 0
call dword [0x95c138]
mov dword [ebp - 0x10], eax
push 1
call dword [0x95c138]
mov dword [ebp - 0x18], eax
mov ecx, dword [0x95e430]
mov dword [ebp - 0x40], ecx
mov edx, dword [0x95e42c]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x40]
shr eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 8]
shr ecx, 1
mov dword [ebp - 0x1c], ecx
push 0
mov edx, dword [0x95e4b8]
push edx
push 0
push 0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x14]
push eax
push 0x80000000
push 0x95c680
push 0x95c6d0
push 0x88
call dword [0x95c134]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov dword [0x95e428], ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [0x95c10c]
push eax
call fcn.00958530
push 5
mov eax, dword [ebp - 0xc]
push eax
call dword [0x95c148]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [0x95c12c]
push 0x9585c0
mov edx, dword [0x95e4cc]
mov eax, dword [edx + 0x34]
imul eax, eax, 0x3e8
push eax
push 0
push 0
call dword [0x95c13c]
mov dword [0x95e434], eax
push 1
push 0
push 0
push 0
lea ecx, [ebp - 0x3c]
push ecx
call dword [0x95c130]
test eax, eax
je 0x958737
cmp dword [ebp - 0x38], 0x12
jne 0x95872b
mov dword [0x95e444], 0
call fcn.00958740
xor eax, eax
jmp 0x958737
lea edx, [ebp - 0x3c]
push edx
call dword [0x95c140]
jmp 0x9586fc
mov esp, ebp
pop ebp
ret 4

Function at 0x959b00
Capabilities:
Read .ini file
Read and send data from client to server
Send data
Send data on socket
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebp
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
pop ebp
mov eax, dword [ebp + 8]
push eax
call dword [int.0095c0dc]
call dword [fcn.0095c124]
call dword [fcn.0095c128]
call dword [fcn.0095c094]
call dword [0x95c0fc]
call dword [int.0095c0f4]
call dword [fcn.0095c150]
call dword [int.0095c00c]
call dword [int.0095c000]
call dword [int.0095c160]
call fcn.0095b644
mov eax, 1
pop ebp
ret 4
Function at 0x95a69c
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, 0x95c168
sub eax, eax
test esi, esi
je 0x95a774
sub eax, 1
test ecx, ecx
je 0x95a772
test esi, 3
je 0x95a6da
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x95a6bf
mov edx, ecx
and edx, 7
shr ecx, 3
je 0x95a759
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x95a6e4
mov ecx, edx
test ecx, ecx
je 0x95a772
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x95a75f
not eax
mov dword [esp + 0x1c], eax
popal
ret

Function at 0x95a77c
Capabilities:
Decompress data using aplib

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
cld
mov dl, 0x80
xor ebx, ebx
movsb byte es:[edi], byte [esi]
mov bl, 2
call fcn.0095a7ff
jae 0x95a78a
xor ecx, ecx
call fcn.0095a7ff
jae 0x95a7b9
xor eax, eax
call fcn.0095a7ff
jae 0x95a7c9
mov bl, 2
inc ecx
mov al, 0x10
call fcn.0095a7ff
adc al, al
jae 0x95a7ab
jne 0x95a7f5
stosb byte es:[edi], al
jmp 0x95a78d
call fcn.0095a80b
sub ecx, ebx
jne 0x95a7d2
call fcn.0095a809
jmp 0x95a7f1
lodsb al, byte [esi]
shr eax, 1
je 0x95a81b
adc ecx, ecx
jmp 0x95a7ee
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
call fcn.0095a809
cmp eax, 0x7d00
jae 0x95a7ee
cmp ah, 5
jae 0x95a7ef
cmp eax, 0x7f
ja 0x95a7f0
inc ecx
inc ecx
xchg ebp, eax
mov eax, ebp
mov bl, 1
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x95a78d
sub edi, dword [esp + 0x28]
mov dword [esp + 0x1c], edi
popal
ret

Function at 0x95b14c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x95e000]
jne 0x95b156
repz ret
jmp fcn.0095b3fd
Function at 0x437d13
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
pushal
call 0x437d22
pop dword [ebp - 0x40]
mov eax, 0x437d22
sub dword [ebp - 0x40], eax
push 0x40
push 0x1000
push 0x4feb6
push 0
mov eax, 0x6a5c6e11
add eax, 0x95e8449f
add eax, dword [ebp - 0x40]
call dword [eax]
mov ecx, 0x3b4ce7f5
sub ecx, 0x3b4ca0a3
mov edi, eax
mov esi, 0x3a9ebcab
add esi, 0xc5a8a155
add esi, dword [ebp - 0x40]
mov ebx, 0xfcb9a5cc
add ebx, 0x305ca866
add dword [ebp - 0x3c], edx
mov edx, dword [esi]
sub dword [ebp - 8], 0xf1c505f6
xor edx, ebx
xor dword [ebp - 8], edi
mov dword [edi], edx
add dword [ebp - 0x3c], esi
add edi, 0x21a0cb3d
sub edi, 0x21a0cb39
add esi, 0x39bc2b03
sub esi, 0x39bc2aff
loop 0x437d7c
add eax, 0xa0d1f425
sub eax, 0xa0d0e40a
mov ebx, eax
add eax, 5
mov ecx, 0x142ece4a
add ecx, 0xec1131b6
add ecx, dword [ebp - 0x40]
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 0x402a48
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404508
test esi, esi
jne 0x402a7e
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.004045f8
jmp 0x402a9c
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040295c
mov edi, eax
test esi, esi
je 0x402a9c
cmp dword [ebx], 0
je 0x402a9c
dec esi
jmp 0x402a85
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x403030
Capabilities:
Read file on windows

Disassembly:
push ebx
xor ecx, ecx
mov ebx, eax
mov cx, word [eax + 4]
sub ecx, 0xd7b1
je 0x403046
sub ecx, 2
jne 0x403068
push 0
mov eax, esp
push 0
push eax
push dword [ebx + 8]
push edx
push dword [ebx]
call sub.kernel32.dll_ReadFile
pop edx
dec eax
jne 0x40306f
cmp edx, dword [ebx + 8]
je 0x403079
mov eax, 0x64
jmp 0x403074
mov eax, 0x67
jmp 0x403074
call sub.kernel32.dll_GetLastError
call fcn.0040289c
pop ebx
ret

Function at 0x403280
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, eax
movzx eax, word [eax + 4]
sub eax, 0xd7b2
cmp eax, 1
ja 0x4032b3
push 0
mov eax, esp
push 0
push eax
push dword [ebx + 8]
push edx
push dword [ebx]
call sub.kernel32.dll_WriteFile
pop edx
dec eax
jne 0x4032ba
cmp edx, dword [ebx + 8]
je 0x4032c4
mov eax, 0x65
jmp 0x4032bf
mov eax, 5
jmp 0x4032bf
call sub.kernel32.dll_GetLastError
call fcn.0040289c
mov eax, ebx
pop ebx
ret

Function at 0x403630
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x486020]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4036c8
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4036a8
xor eax, eax
push ebp
push 0x4036a1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x4036e4
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4036a8
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x486020]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x486020], ax
mov esp, ebp
pop ebp
ret

Function at 0x40438c
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x488048], 0
je 0x4043ed
cmp word [0x48821c], 0xd7b2
jne 0x4043b5
cmp dword [0x488224], 0
jbe 0x4043b5
mov eax, 0x488218
call dword [0x488234]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x486090
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404414
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x486030], 0
jne 0x404409
push 0
push 0x486088
push 0x486090
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x4060bc
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x406122
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.00404778
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.004031ac
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x40610c
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406129
lea eax, [ebp - 0x10]
call fcn.00404508
ret

Function at 0x40b5cc
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40b605
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.004045f8
jmp 0x40b60e
mov eax, ebx
mov edx, esi
call fcn.0040455c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40b618
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40b639
mov al, byte [esp]
jmp 0x40b63b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40c5d8
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
xor edx, edx
mov dword [ebp - 8], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40c6ae
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 8]
mov edx, ebx
call fcn.004045a0
lea eax, [ebp - 8]
call fcn.00404a18
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.004049c8
push eax
call sub.version.dll_GetFileVersionInfoSizeA
mov ebx, eax
test ebx, ebx
je 0x40c698
mov eax, ebx
call fcn.00402714
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x40c691
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x10]
push eax
push ebx
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.004049c8
push eax
call sub.version.dll_GetFileVersionInfoA
test eax, eax
je 0x40c67b
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x40c6c0
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x40c67b
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c698
mov eax, dword [ebp - 0x10]
call fcn.00402734
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c6b5
lea eax, [ebp - 8]
call fcn.00404508
ret