joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4016d9
Capabilities:
Hide graphical window

Disassembly:
push ebp
push edi
mov ecx, 0xa
push esi
push ebx
xor esi, esi
mov eax, esi
sub esp, 0x8c
lea edi, [esp + 0x58]
mov ebp, dword [esp + 0xa0]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x58]
mov dword [esp + 0x68], ebp
mov dword [esp + 0x5c], 0x401500
mov dword [esp + 0x7c], str.WindowClass
mov dword [esp], eax
call dword [sym.imp.USER32.dll_RegisterClassW]
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push ecx
mov dword [esp], 0
call edi
push ebx
mov ebx, eax
mov dword [esp], 1
call edi
sub eax, 0x1c2
mov ecx, 2
push edi
cdq
idiv ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0x1c2
mov dword [esp + 0x18], 0x258
mov dword [esp + 0xc], 0xcf0000
mov dword [esp + 8], str.Simple_Window
mov dword [esp + 4], str.WindowClass
mov dword [esp], 0
mov dword [esp + 0x14], eax
lea eax, [ebx - 0x258]
cdq
idiv ecx
mov dword [esp + 0x10], eax
call dword [sym.imp.USER32.dll_CreateWindowExW]
sub esp, 0x30
mov edx, dword [esp + 0xac]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.USER32.dll_ShowWindow]
push ebp
push ebp
mov eax, esi
mov ecx, 7
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
lea edi, [esp + 0x3c]
lea ebx, [esp + 0x3c]
rep stosd dword es:[edi], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call esi
sub esp, 0x10
test eax, eax
je 0x401810
mov dword [esp], ebx
call dword [sym.imp.USER32.dll_TranslateMessage]
push eax
mov dword [esp], ebx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push edx
jmp 0x4017d6
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret 0x10

Function at 0x401c80
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
jmp fcn.00401ce0
Function at 0x401ce0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x405050]
test esi, esi
jle 0x401dcd
mov edi, dword [0x405054]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x401d14
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x401dc6
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x401d00
mov dword [esp], eax
mov ebx, eax
call fcn.00402620
test eax, eax
mov edi, eax
je 0x401e0a
lea ebx, [esi + esi*2]
mov esi, dword [0x405054]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call fcn.00402720
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x405054]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401dea
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x401dbf
sub eax, 0x40
and eax, 0xffffffbf
je 0x401dbf
mov eax, dword [esp + 0x20]
add ebx, dword [0x405054]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x401dd4
add dword [0x405050], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x401d1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00401c80
mov eax, dword [0x405054]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00401c80
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00401c80
lea esi, [esi]

Function at 0x4022d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x405408
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x405400]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x402325
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40231e
test esi, esi
je 0x40231e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402300
mov dword [esp], 0x405408
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x402540
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x402578
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp edx, ebx
ja 0x40256e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40257a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402560
xor eax, eax
pop ebx
pop esi
ret
Function at 0x422560
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42258d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42258d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x4233c3
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push esi
xor esi, esi
cmp dword [esp + 0x10], esi
jbe 0x423413
push ebx
mov ebx, dword [esp + 0x14]
and ebx, 1
mov al, byte [esi + ebp]
mov ecx, 0x430260
xor al, 0x73
sub al, 0x58
push ebx
mov byte [esi + ebp], al
call fcn.004024ea
push eax
call fcn.00401dd2
mov al, byte [esi + ebp]
sub al, 0x14
xor al, 0x74
add al, 0x4e
xor al, 0x70
sub al, 0x65
xor al, 0x22
sub al, 0x73
xor al, 0x2a
mov byte [esi + ebp], al
inc esi
pop ecx
cmp esi, dword [esp + 0x14]
jb 0x4233d9
pop ebx
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x42f040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.006:107_4:_00007:277_0:_004:_04:_008:_08:_08:_8:_7:2_3:_9:193_4:_
lea ecx, [ebp - 0x1c]
call fcn.00401fdd
push 0xc
call fcn.00406576
pop ecx
test eax, eax
je 0x42344d
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, eax
call section..bss
jmp 0x42344f
xor eax, eax
mov eax, dword [eax + 4]
shl eax, 2
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push 0x40
push 0x4ac
push 0x47ac20
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push 0x42339a
lea ecx, [ebp - 0x28]
call fcn.00401d1e
lea ecx, [ebp - 0x28]
call fcn.004040aa
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 0x47ac20
add edx, 0x188
mov esi, 0x431020
push esi
call edx
cmp dword [ebp - 0x24], 0
jne 0x4234c4
lea ecx, [ebp - 0x1c]
call fcn.004033ef
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.004065b4
leave
ret
call fcn.0040dc7b
int3
Function at 0x10006089
Capabilities:
Resume thread

Disassembly:
push 0x10
mov eax, 0x10011324
call fcn.10010dbc
mov ebx, ecx
mov dword [ebp - 0x18], ebx
cmp byte [ebx + 4], 0
jne 0x100061ed
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
cmp eax, dword [ebx]
jne 0x100061ed
push 0x1000334a
push 0xd008
call fcn.100062eb
mov edi, eax
mov dword [ebp - 0x1c], edi
pop ecx
pop ecx
test edi, edi
je 0x100061e6
push 0xc000
xor ebx, ebx
push ebx
push edi
call fcn.1000ec20
add esp, 0xc
mov dword [edi + 0xc000], ebx
lea eax, [edi + 0xc004]
push 0x1000
push ebx
push eax
call fcn.1000ec20
add esp, 0xc
mov dword [edi + 0xd004], ebx
test edi, edi
je 0x100061e6
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
lea ecx, [ebp - 0x1c]
call fcn.100062eb
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.100062eb
mov esi, eax
push esi
push 0x10003028
mov dword [ebp - 0x10], esi
call fcn.100062eb
pop ecx
pop ecx
test esi, esi
jne 0x1000619a
mov ecx, edi
call fcn.100062eb
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x100061fa
mov eax, dword [eax]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x10014250]
mov ecx, dword [ebp - 0x14]
call esi
call fcn.100062eb
test eax, eax
je 0x10006190
jg 0x10006175
mov esi, eax
mov dword [ebp - 0x10], eax
jmp 0x10006181
movzx esi, ax
or esi, 0x80070000
mov dword [ebp - 0x10], esi
push esi
push 0x10003050
call fcn.100062eb
pop ecx
pop ecx
jmp 0x1000619a
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
mov byte [eax + 4], 1
lea ecx, [ebp - 0x1c]
call fcn.1000704c
lea eax, [edi + 0xc000]
mov dword [ebp - 0x1c], eax
cmp dword [eax], ebx
jbe 0x100061ce
lea esi, [edi + 8]
test byte [esi - 4], 1
je 0x100061c3
push dword [esi]
call dword [sym.imp.kernel32.dll_ResumeThread]
mov eax, dword [ebp - 0x1c]
inc ebx
add esi, 0xc
cmp ebx, dword [eax]
jb 0x100061b2
mov esi, dword [ebp - 0x10]
mov ecx, edi
call fcn.100062eb
push 0xd008
push edi
call fcn.100062eb
pop ecx
pop ecx
mov eax, esi
jmp 0x100061f2
mov eax, 0x8007000e
jmp 0x100061f2
mov eax, 0x800710dd
call fcn.10010d85
ret 4
call fcn.100062eb
int3

Function at 0x100062eb
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
pushal
call 0x100062fa
pop dword [ebp - 0x1c]
mov eax, 0xc353ad55
add eax, 0x4cacb5a5
sub dword [ebp - 0x1c], eax
push 0x40
push 0x1000
push 0x3feb0
push 0
mov eax, 0x727a6d9e
sub eax, 0x62792d3a
add eax, dword [ebp - 0x1c]
call dword [eax]
mov ecx, 0x9e753c47
add ecx, 0x618b274e
xor edx, edx
add edx, eax
mov esi, 0x10018600
add esi, dword [ebp - 0x1c]
mov ebx, 0x9992e04d
mov edi, dword [esi]
xor dword [ebp - 8], 0xda5577c0
xor edi, ebx
add dword [ebp - 8], 0x1c7c991e
mov dword [edx], edi
xor dword [ebp - 0xc], 0xf7f17c86
add edx, 0xa3b9ff48
sub edx, 0xa3b9ff44
add esi, 4
loop 0x1000634f
add eax, 0xa94a12d0
add eax, 0x56b76e57
xor ebx, ebx
add ebx, eax
add eax, 0xc4a5e186
add eax, 0x3b5a1e7f
mov ecx, 0x10000000
add ecx, dword [ebp - 0x1c]
call ebx
leave
ret
Function at 0x40d4e2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor edi, edi
push edi
push ecx
push ecx
mov eax, esp
push dword [ebp + 8]
mov esi, 0x411488
mov dword [eax], esi
mov dword [eax + 4], 0x104
call fcn.00404927
cmp eax, edi
je 0x40d59d
push edi
push 0x8000000
push 2
push edi
push edi
push 0x40000000
push esi
call fcn.0040188c
cmp eax, 0xffffffff
je 0x40d548
push 0x40d5c0
push 0x8000
push eax
call dword [sym.imp.MSVCR80.dll__open_osfhandle]
pop ecx
pop ecx
push eax
call dword [sym.imp.MSVCR80.dll__fdopen]
pop ecx
pop ecx
mov dword [0x411480], eax
cmp dword [0x411480], edi
jne 0x40d55a
push esi
push 1
mov eax, 0x304
jmp 0x40d5a6
mov eax, 0x410060
mov byte [0x411486], 1
call fcn.0040dacd
push dword [0x411480]
lea eax, [ebp + 8]
push 1
push 2
push eax
mov dword [ebp + 8], CryptGetHashParam
call dword [sym.imp.MSVCR80.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x40d5b2
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040d6a6
xor eax, eax
jmp 0x40d5b7
push dword [ebp + 8]
mov eax, 0x30d
push edi
mov ecx, 0x410060
call fcn.0040cab2
pop ecx
pop ecx
mov eax, 0x80004005
pop edi
pop esi
pop ecx
pop ebp
ret 0xc

Function at 0x40d5c3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
mov esi, 0x410060
push 0x3011
call fcn.0040d633
mov eax, dword [ebp + 0xc]
pop ecx
pop ecx
lea ecx, [eax + 2]
pop esi
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x40d5e2
push dword [0x411480]
sub eax, ecx
sar eax, 1
push eax
push 2
push dword [ebp + 0xc]
call dword [sym.imp.MSVCR80.dll_fwrite]
push 0x40c7bc
push dword [0x411480]
call dword [sym.imp.MSVCR80.dll_fwprintf_s]
add esp, 0x18
pop ebp
ret 8
Function at 0x405c68
Capabilities:
Delete file

Disassembly:
mov eax, 0x41459f
call fcn.0041440c
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
mov eax, dword [esi + 0x4c]
test eax, eax
mov dword [ebp - 4], 2
je 0x405578
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esi + 0x74]
test eax, eax
je 0x405586
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
lea eax, [esi + 0x8c]
cmp dword [eax], 0
je 0x405599
mov eax, dword [eax]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esi + 0x50]
test eax, eax
je 0x4055b2
push dword [eax + 0x20]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push dword [esi + 0x50]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
pop ecx
mov eax, dword [esi + 0x70]
test eax, eax
je 0x4055c0
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esi + 0x78]
test eax, eax
mov ebx, dword [sym.imp.OLEAUT32.dll_SysStringLen]
je 0x4055d0
push eax
call ebx
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x4055da
push eax
call ebx
mov eax, dword [esi + 0x80]
test eax, eax
je 0x4055e7
push eax
call ebx
mov eax, dword [esi + 0x84]
test eax, eax
je 0x4055f4
push eax
call ebx
lea edi, [esi + 0x88]
mov eax, dword [edi]
test eax, eax
je 0x40560b
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [edi]
call ebx
mov ecx, esi
call fcn.0040547d
lea ecx, [esi + 0x60]
mov byte [ebp - 4], 1
call fcn.0040541c
lea ecx, [esi + 0x54]
call fcn.0040dcae
lea ecx, [esi + 0x24]
call fcn.00403f42
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
push esi
mov esi, ecx
push 0x4189a4
mov dword [esi], 0x40164c
mov dword [esi + 4], 1
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, esi
pop esi
jmp 0x405550
Function at 0x406f14
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4188a4]
push esi
push 0xf0000000
xor esi, esi
push 0x18
push esi
mov dword [ebp + 0x39c], eax
push esi
lea eax, [ebp - 0x78]
push eax
mov dword [ebp - 0x80], 0x20
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x74], esi
mov byte [ebp + 0x390], 0x48
mov byte [ebp + 0x391], 0x55
mov byte [ebp + 0x392], 0x5b
mov byte [ebp + 0x393], 0xb6
mov byte [ebp + 0x394], 0xba
mov byte [ebp + 0x395], 0x55
mov byte [ebp + 0x396], 0xb9
mov byte [ebp + 0x397], 0x4c
mov byte [ebp + 0x398], 0xea
mov byte [ebp + 0x399], 0xb1
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x407068
push ebx
push edi
lea eax, [ebp - 0x74]
push eax
push esi
push esi
push 0x800c
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x406fbf
xor edi, edi
jmp 0x40705a
mov edi, dword [sym.imp.ADVAPI32.dll_CryptHashData]
push esi
push 0xa
lea eax, [ebp + 0x390]
push eax
push dword [ebp - 0x74]
call edi
test eax, eax
jne 0x406fdc
xor edi, edi
jmp 0x407051
push 0x401750
push dword [ebp + 0x3a8]
mov dword [ebp - 0x7c], esi
call dword [sym.imp.msvcrt.dll__wfopen]
mov ebx, eax
cmp ebx, esi
pop ecx
pop ecx
je 0x407034
push ebx
push 0x400
lea eax, [ebp - 0x70]
push 1
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, esi
jbe 0x40702c
add dword [ebp - 0x7c], eax
push esi
push eax
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x74]
call edi
test eax, eax
je 0x40707e
cmp dword [ebp - 0x7c], 0x1400
jb 0x406ff8
push ebx
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
push esi
lea eax, [ebp - 0x80]
push eax
push dword [ebp + 0x3ac]
push 2
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
xor edi, edi
test eax, eax
je 0x407051
inc edi
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push esi
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, edi
pop edi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop esi
call fcn.0041408d
add ebp, 0x3a0
leave
ret 8
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push esi
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push ebx
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
xor eax, eax
jmp 0x407066
Function at 0x40709d
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x4188a4]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push 8
pop ecx
push 0xf0000000
push 0x18
push 0x401758
xor ebx, ebx
mov dword [ebp - 4], eax
push ebx
lea eax, [ebp - 0x3c]
mov byte [ebp - 0x30], cl
mov byte [ebp - 0x2f], 2
mov word [ebp - 0x2e], bx
mov dword [ebp - 0x2c], 0x6610
mov dword [ebp - 0x28], 0x20
lea edi, [ebp - 0x24]
push eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x40718a
lea eax, [ebp + 0xc]
push eax
push ebx
push ebx
push 0x2c
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
xor edi, edi
test eax, eax
je 0x40717e
mov esi, dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
push ebx
lea eax, [ebp - 0x34]
push eax
push 4
push dword [ebp + 0xc]
inc edi
mov dword [ebp - 0x34], edi
call esi
test eax, eax
jne 0x40712c
xor edi, edi
jmp 0x407175
push ebx
lea eax, [ebp - 0x34]
push eax
push 3
push dword [ebp + 0xc]
mov dword [ebp - 0x34], edi
call esi
test eax, eax
je 0x407128
mov ecx, dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::data_void_const]
push eax
push ebx
push edi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x407128
push dword [ebp - 0x38]
mov ecx, dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::resize_unsigned_int_]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebx
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0041408d
leave
ret 8
Function at 0x4074e5
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
cmp dword [0x4188f4], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersion]
push esi
jne 0x407529
call ebx
test eax, eax
jns 0x40751f
push 0x401810
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x401804
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x4188f0], eax
mov dword [0x4188f4], 1
mov eax, dword [0x4188f0]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x407545
push dword [ebp + 0x10]
push eax
call esi
test eax, eax
mov dword [ebp - 4], eax
jne 0x407575
push edi
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
test eax, eax
jne 0x40756b
call ebx
test eax, eax
mov eax, dword [ebp + 8]
jns 0x40755f
push dword [eax + 8]
call dword [eax]
jmp 0x407565
push dword [eax + 0xc]
call dword [eax + 4]
test eax, eax
je 0x407574
mov dword [edi], eax
push dword [ebp + 0x10]
push eax
call esi
mov dword [ebp - 4], eax
pop edi
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret 0xc

Function at 0x407a4e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 5
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x407a7a
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x407a7a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x407a7c
xor eax, eax
ret 8

Function at 0x40aa3b
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
test byte [0x418a18], 1
push ebx
push esi
push edi
jne 0x40aa5e
or dword [0x418a18], 1
call fcn.0040a9e7
mov dword [0x418a14], eax
push 4
pop eax
call fcn.004144f0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40aaf3
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x48]
lea edi, [eax - 1]
not edi
and edi, esi
sub edi, eax
mov dword [ebp - 8], eax
mov eax, dword [0x4188cc]
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xffff1000
add esi, 0x11000
add esi, ebx
cmp edi, esi
jb 0x40aaf3
cmp eax, 1
je 0x40ab14
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40aaf3
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40aac0
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40aaef
xor eax, eax
inc eax
jmp 0x40ab33
cmp edi, eax
jae 0x40aaf7
xor eax, eax
jmp 0x40ab33
cmp eax, esi
jae 0x40aafe
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4188cc]
jmp 0x40ab17
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40acd1
Capabilities:
Set registry value

Disassembly:
push esi
push dword [esp + 8]
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [esp + 0xc]
push 1
push 0
push dword [esp + 0x1c]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop esi
ret 8

Function at 0x40b022
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword [esp + 8]
cmp word [ecx], 0
mov eax, dword [esp + 4]
push ebx
mov ebx, eax
je 0x40b0b0
cmp word [eax], 0
push ebp
push esi
push edi
je 0x40b0ab
mov ebp, dword [sym.imp.USER32.dll_CharNextW]
cmp word [ebx], 0
mov edi, dword [esp + 0x18]
mov esi, ebx
je 0x40b09a
mov ax, word [edi]
test ax, ax
je 0x40b0b4
movzx ecx, word [esi]
movzx eax, ax
sub ecx, eax
jne 0x40b09a
push esi
call ebp
push edi
mov dword [esp + 0x18], eax
call ebp
mov ecx, eax
mov eax, dword [esp + 0x14]
mov edx, eax
sub ecx, edi
sub edx, esi
xor ecx, edx
test ecx, 0xfffffffe
jne 0x40b09a
jmp 0x40b090
inc esi
inc esi
movzx edx, word [esi]
inc edi
inc edi
movzx ecx, word [edi]
sub edx, ecx
je 0x40b094
cmp esi, eax
jb 0x40b082
cmp word [esi], 0
jne 0x40b04e
cmp word [edi], 0
je 0x40b0b4
push ebx
call ebp
mov ebx, eax
cmp word [ebx], 0
jne 0x40b042
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 8
mov eax, ebx
jmp 0x40b0ad

Function at 0x40b264
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov eax, 0x200c
lea ebp, [esp - 0x1f8c]
call fcn.004144f0
mov eax, dword [0x4188a4]
push esi
xor esi, esi
push esi
push esi
push esi
push esi
mov dword [ebp + 0x1f88], eax
lea eax, [ebp - 0x7c]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push dword [ebp + 0x1f94]
mov dword [ebp - 0x7c], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x40b2d8
cmp dword [ebp - 0x7c], 1
jne 0x40b2dc
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x78]
push eax
push esi
push dword [ebp + 0x1f94]
mov dword [ebp - 0x80], 0x1000
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x40b2d8
cmp word [ebp - 0x78], si
je 0x40b2d8
inc eax
jmp 0x40b2e5
xor eax, eax
jmp 0x40b2e5
xor eax, eax
cmp eax, dword [ebp - 0x7c]
sbb eax, eax
neg eax
mov ecx, dword [ebp + 0x1f88]
pop esi
call fcn.0041408d
add ebp, 0x1f8c
leave
ret 4