joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4567b4
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [0x463b48]
cmp dword [eax + 0x30], 0
je 0x45685e
cmp dword [ebx + 0x94], 0
jne 0x456858
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x456744
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0x90]
cmp dword [eax + 8], 0
je 0x456858
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongA
test al, 8
je 0x45681e
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0x90]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x456858
push 0x213
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov edx, esi
mov eax, dword [ebx + 0x90]
call fcn.00414244
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x45682d
inc dword [ebx + 0x94]
pop ecx
pop edx
pop esi
pop ebx
ret

Function at 0x4573bc
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xffffff00
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0xa4], 0
je 0x4573f1
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x30]
push eax
call sub.user32.dll_GetWindowTextA
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.004045b0
jmp 0x4573fe
mov eax, esi
mov edx, dword [ebx + 0x8c]
call fcn.00404514
add esp, 0x100
pop esi
pop ebx
ret

Function at 0x4585a0
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, dword [ebx + 0x84]
test esi, esi
je 0x4585e1
mov eax, esi
call fcn.0043db14
test al, al
je 0x4585e1
mov eax, dword [ebx + 0x84]
call fcn.0043d810
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x4585e1
push 0
mov eax, dword [ebx + 0x84]
call fcn.0043d810
push eax
call sub.user32.dll_ShowWindow
pop esi
pop ebx
ret
Function at 0x45e3d0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffde4
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x218], ecx
mov dword [ebp - 0x214], ecx
mov dword [ebp - 0x210], ecx
mov dword [ebp - 0x20c], ecx
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x45e630
push dword fs:[eax]
mov dword fs:[eax], esp
cmp ebx, 1
jl 0x45e433
lea edx, [ebp - 0x20c]
mov eax, dword [ebp - 4]
call fcn.0045dee8
mov eax, dword [ebp - 0x20c]
mov edx, ebx
call fcn.0040c4c0
cmp al, 1
jne 0x45e433
dec ebx
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 4]
call fcn.0045e1b0
test al, al
je 0x45e5bf
cmp dword [ebp - 8], 0
jge 0x45e451
xor eax, eax
mov dword [ebp - 8], eax
mov ebx, dword [ebp - 8]
inc ebx
lea edx, [ebp - 0x210]
mov eax, dword [ebp - 4]
call fcn.0045dee8
mov eax, dword [ebp - 0x210]
call fcn.00404780
cmp ebx, eax
jge 0x45e49b
lea edx, [ebp - 0x214]
mov eax, dword [ebp - 4]
call fcn.0045dee8
mov eax, dword [ebp - 0x214]
mov al, byte [eax + ebx - 1]
mov edx, dword [0x462254]
and eax, 0xff
bt dword [edx], eax
jae 0x45e49b
inc ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x228]
cmp eax, dword [ebp - 8]
jg 0x45e4af
mov dword [ebp - 8], eax
mov ebx, dword [ebp - 8]
mov ecx, ebx
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.0045e3ac
cmp ebx, dword [ebp - 8]
je 0x45e5b1
lea eax, [ebp - 0x108]
push eax
call sub.user32.dll_GetKeyboardState
mov edx, pe_nt_image_headers32
lea eax, [ebp - 0x208]
mov byte [eax], 0
inc eax
dec edx
jne 0x45e4db
mov byte [ebp - 0x1f8], 0x81
mov eax, dword [ebp - 4]
mov si, 0xffc8
call fcn.004038b8
and eax, 0x7f
movzx eax, word [eax*2 + 0x461e38]
mov byte [ebp + eax - 0x208], 0x81
lea eax, [ebp - 0x208]
push eax
call sub.user32.dll_SetKeyboardState
mov eax, dword [ebp - 4]
mov byte [eax + 0x23c], 1
xor eax, eax
push ebp
push 0x45e59e
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
mov eax, dword [ebp - 4]
mov si, 0xffc8
call fcn.004038b8
and eax, 0x7f
movzx eax, word [eax*2 + 0x461e38]
push eax
push pe_nt_image_headers32
mov eax, dword [ebp - 4]
call fcn.0043d810
push eax
call sub.user32.dll_SendMessageA
push 1
mov eax, dword [ebp - 4]
mov si, 0xffc8
call fcn.004038b8
and eax, 0x7f
movzx eax, word [eax*2 + 0x461e38]
push eax
push 0x101
mov eax, dword [ebp - 4]
call fcn.0043d810
push eax
call sub.user32.dll_SendMessageA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45e5a5
mov eax, dword [ebp - 4]
mov byte [eax + 0x23c], 0
ret
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [eax + 0x230], edx
jmp 0x45e612
cmp dword [ebp - 8], 0
jge 0x45e5ca
xor eax, eax
mov dword [ebp - 8], eax
lea edx, [ebp - 0x218]
mov eax, dword [ebp - 4]
call fcn.0045dee8
mov eax, dword [ebp - 0x218]
call fcn.00404780
cmp eax, dword [ebp - 8]
jg 0x45e604
lea edx, [ebp - 0x21c]
mov eax, dword [ebp - 4]
call fcn.0045dee8
mov eax, dword [ebp - 0x21c]
call fcn.00404780
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0045e3ac
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45e637
lea eax, [ebp - 0x21c]
mov edx, 5
call fcn.004044e4
ret
Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
push 4
nop
pop edi
nop
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
je 0x42e072
nop
nop
mov ebx, 0x407ef8
nop
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x467f2256
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x42e060
nop
nop
nop
nop
mov eax, section..data
nop
nop
nop
cmp eax, 0
nop
nop
nop
je 0x42e0d2
nop
nop
mov ebx, 0x42cd70
nop
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
div edi
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
mov esi, 0x5323af5
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x42e0c0
nop
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x401855
Capabilities:
Terminate thread

Disassembly:
push ecx
push edi
mov edi, dword [0x528608]
test edi, edi
je 0x4018d0
push ebp
push esi
xor ebp, ebp
mov eax, dword [edi + 0x60]
test eax, eax
je 0x401887
cmp eax, 0xffffffff
je 0x40187d
xor edx, edx
mov ecx, edi
call fcn.00401c75
mov eax, dword [edi + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x60], ebp
mov dword [edi + 0x64], ebp
cmp dword [edi + 0x68], ebp
je 0x40189c
push ebp
push dword [edi + 0x68]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [edi + 0x68], ebp
mov dword [edi + 0x6c], ebp
cmp dword [edi + 0x70], ebp
je 0x4018b1
push ebp
push dword [edi + 0x70]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [edi + 0x70], ebp
cmp dword [edi + 8], ebp
je 0x4018bf
push dword [edi + 8]
call fcn.004a64d5
pop ecx
mov esi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, esi
test esi, esi
jne 0x401865
pop esi
pop ebp
pop edi
pop ecx
ret

Function at 0x4019d8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov esi, ecx
xor edi, edi
test esi, esi
je 0x401a40
mov eax, dword [esi + 0x60]
test eax, eax
je 0x401a40
cmp eax, 0xffffffff
je 0x401a40
movzx ecx, word [esi + 0x1e]
cmp dword [ebp + 8], ecx
ja 0x401a2a
push edi
lea ecx, [ebp - 4]
push ecx
push dword [ebp + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test edi, edi
jne 0x401a4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esi + 4]
push str.ERROR_kull_m_busylight_device_send_raw____device__u__WriteFile__0x_08x__n
call fcn.00409cda
add esp, 0xc
jmp 0x401a4f
push ecx
push dword [ebp + 8]
push dword [esi + 4]
push str.ERROR_kull_m_busylight_device_send_raw____device__u__Size_is_not_valide__siz___u__max___u__n
call fcn.00409cda
add esp, 0x10
jmp 0x401a4f
push dword [esi + 4]
push str.ERROR_kull_m_busylight_device_send_raw____device__u__Invalid_Device_Busy_Handle_n
call fcn.00409cda
pop ecx
pop ecx
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x401a55
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
mov ebp, edx
xor ebx, ebx
mov dword [esp + 0xc], ebp
push edi
test esi, esi
je 0x401adb
cmp dword [esi + 0x60], ebx
je 0x401adb
cmp dword [esi + 0x60], 0xffffffff
je 0x401adb
movzx edi, word [esi + 0x1c]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp], eax
test eax, eax
je 0x401aea
mov ebp, dword [esp + 0x18]
push ebx
push ebp
push edi
push eax
push dword [esi + 0x60]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
test ebx, ebx
je 0x401aac
mov ecx, dword [ebp]
cmp ecx, edi
je 0x401aea
mov eax, str.ERROR_kull_m_busylight_device_read_raw____device__u___u_byte_s__readed___u_wanted_n
jmp 0x401abc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 4]
mov edi, eax
mov eax, str.ERROR_kull_m_busylight_device_read_raw____device__u__ReadFile__0x_08x__n
push edi
push ecx
push eax
call fcn.00409cda
mov esi, dword [esp + 0x1c]
add esp, 0xc
push dword [esi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
and dword [ebp], 0
mov dword [esi], eax
jmp 0x401aea
push dword [esi + 4]
push str.ERROR_kull_m_busylight_device_read_raw____device__u__Invalid_Device_Busy_Handle_n
call fcn.00409cda
pop ecx
pop ecx
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
pop ecx
ret

Function at 0x401c75
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], SysReAllocString
xor eax, eax
mov ebx, edx
mov dword [ebp - 8], eax
mov esi, edi
test edi, edi
je 0x401cb9
cmp dword [esi + 0x70], 0
mov dword [esi + 0x6c], eax
je 0x401cab
push eax
push dword [esi + 0x70]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
xor eax, eax
mov dword [esi + 0x70], eax
test ebx, ebx
je 0x401cb3
mov esi, dword [esi]
jmp 0x401cb5
mov esi, eax
test esi, esi
jne 0x401c93
push ebx
push 1
lea edx, [ebp - 8]
mov ecx, edi
call fcn.00401bff
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4020bf
Capabilities:
Get common file path

Disassembly:
push ebp
push esi
push 0x334
push 0x40
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x4021aa
push ebx
push edi
mov eax, 0x4000000
lea edi, [esi + 4]
push 0x2a
mov dword [edi], eax
mov dword [esi + 8], eax
pop eax
mov word [esi + 0x24], ax
xor eax, eax
push ebp
push eax
push edi
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
call fcn.00401fa9
add esp, 0xc
test eax, eax
je 0x40218f
lea ebx, [esi + 0x226]
push ebx
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40219a
push ecx
mov ecx, ebx
call fcn.00401ccd
test eax, eax
js 0x40219a
push ebp
push edi
push 0x401f17
push 0x401ef3
push 0x401ec7
push fcn.00401ea3
push 0x401e72
push 0x401e41
push fcn.00401de9
push 0x401dde
push 0x401dd1
lea ebx, [esi + 0x328]
push fcn.00401dce
push ebx
call dword [sym.imp.Cabinet.dll_FCICreate]
add esp, 0x34
mov dword [esi], eax
test eax, eax
jne 0x40219a
mov ecx, dword [ebx]
call fcn.00402053
push eax
push ecx
push 0x4d3ac8
call fcn.00409cda
add esp, 0xc
jmp 0x40219a
push str.ERROR_kull_m_cabinet_create___Failed_to_initialize_the_cabinet_information_structure._n
call fcn.00409cda
pop ecx
cmp dword [esi], 0
pop edi
pop ebx
jne 0x4021aa
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, eax
mov eax, esi
pop esi
pop ebp
ret
Function at 0x4032e8
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
mov ebx, ebp
push edi
mov edi, edx
cmp esi, 0x8000
jne 0x40336c
cmp dword [esp + 0x30], 4
jne 0x403425
lea eax, [esp + 0x10]
push eax
push 0xffffff7c
call dword [sym.imp.cryptdll.dll_CDLocateCheckSum]
test eax, eax
js 0x403425
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
push ebp
call dword [eax + 0xc]
test eax, eax
js 0x403425
mov eax, dword [esp + 0x10]
push edi
push dword [esp + 0x2c]
push dword [esp + 0x24]
call dword [eax + 0x10]
push dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
push dword [esp + 0x20]
call dword [eax + 0x14]
test eax, eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
setns bl
call dword [eax + 0x18]
jmp 0x403425
push 0xf0000000
push 0x18
push ebp
push ebp
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x403425
lea eax, [esp + 0x18]
push eax
push ebp
push ebp
push esi
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x40341a
push ebp
push dword [esp + 0x2c]
push edi
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x403410
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
lea eax, [esp + 0x14]
push ebp
push eax
push ebp
push 2
push dword [esp + 0x28]
call edi
test eax, eax
je 0x403410
push dword [esp + 0x14]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x403410
push ebp
lea eax, [esp + 0x18]
push eax
push esi
push 2
push dword [esp + 0x28]
call edi
mov ecx, dword [esp + 0x30]
mov ebx, eax
cmp dword [esp + 0x14], ecx
cmovb ecx, dword [esp + 0x14]
push ecx
push esi
push dword [esp + 0x34]
call fcn.0049fa90
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push ebp
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x14
ret
Function at 0x40342f
Capabilities:
Encrypt data using des via winapi

Disassembly:
push ecx
push ecx
push ebx
mov ebx, dword [esp + 0x14]
mov eax, edx
push ebp
push esi
mov dword [esp + 0x10], ecx
mov ecx, 0x6603
push edi
xor edi, edi
mov dword [esp + 0x10], eax
lea ebp, [ebx + 0xc]
cmp eax, ecx
je 0x4034a1
push ebp
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x4034c2
mov eax, dword [esp + 0x10]
push ebx
push dword [esp + 0x20]
mov dword [esi + 4], eax
lea eax, [esi + 0xc]
push eax
mov dword [esi], 0x208
mov dword [esi + 8], ebx
call fcn.0049fa90
add esp, 0xc
push dword [esp + 0x28]
push dword [esp + 0x28]
push edi
push ebp
push esi
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4034c2
cmp dword [esp + 0x2c], edi
je 0x4034c2
push dword [esp + 0x2c]
mov edx, dword [esp + 0x20]
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push ebx
call fcn.00403cc7
add esp, 0x10
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret

Function at 0x4034cb
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0x11c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x12c]
mov ebp, edx
push edi
mov edi, dword [esp + 0x138]
cmp esi, edi
mov dword [esp + 0x10], ecx
sbb ebx, ebx
inc ebx
cmp esi, edi
jb 0x4034f9
push edi
push ebp
jmp 0x40358b
push 0x40
lea eax, [esp + 0x18]
push 0x36
push eax
call fcn.0049ee30
push 0x40
lea eax, [esp + 0x64]
push 0x5c
push eax
call fcn.0049ee30
add esp, 0x18
xor edx, edx
test esi, esi
je 0x403538
lea eax, [esp + 0x14]
sub ebp, eax
lea eax, [esp + 0x14]
add eax, edx
mov cl, byte [eax + ebp]
xor byte [eax], cl
xor byte [esp + edx + 0x54], cl
inc edx
cmp edx, esi
jb 0x403524
mov ebp, dword [esp + 0x10]
lea eax, [esp + 0x94]
push esi
push eax
push 0x40
lea edx, [esp + 0x20]
mov ecx, ebp
call fcn.004032e8
add esp, 0xc
test eax, eax
je 0x40359a
lea eax, [esp + 0x94]
mov ecx, ebp
push esi
add eax, esi
lea edx, [esp + 0x58]
push eax
push 0x40
call fcn.004032e8
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x40359a
lea ecx, [esi + esi]
cmp edi, ecx
lea eax, [esp + 0x94]
cmovb ecx, edi
push ecx
push eax
push dword [esp + 0x13c]
call fcn.0049fa90
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x11c
ret
Function at 0x40364a
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
xor ebp, ebp
mov dword [esp + 0x1c], ecx
push 0xf0000000
push 0x18
push ebp
push ebp
lea eax, [esp + 0x24]
mov dword [esp + 0x30], ebp
push eax
mov esi, edx
mov dword [esp + 0x38], ebp
mov ebx, ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x40377c
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push ebp
push eax
push 0x100
push dword [esp + 0x40]
mov edx, 0x6602
push esi
call fcn.0040342f
add esp, 0x14
test eax, eax
je 0x403771
lea eax, [esp + 0xc]
push eax
push ebp
push dword [esp + 0x20]
push 0x8009
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x403767
push ebp
lea eax, [esp + 0x20]
push eax
push 5
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
je 0x40375d
push ebp
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x40375d
push ebp
lea eax, [esp + 0x14]
push eax
push ebp
push 2
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40375d
push dword [esp + 0x10]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x40375d
push ebp
lea eax, [esp + 0x14]
push eax
push esi
push 2
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov ecx, dword [esp + 0x44]
mov ebx, eax
cmp dword [esp + 0x10], ecx
cmovb ecx, dword [esp + 0x10]
push ecx
push esi
push dword [esp + 0x48]
call fcn.0049fa90
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebp
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x24
ret
Function at 0x403785
Capabilities:
Create new key via cryptacquirecontext
Encode data using xor
Initialize hashing via wincrypt

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push 0xf0000000
push 0x18
xor esi, esi
mov dword [esp + 0x1c], edx
push esi
push esi
lea eax, [esp + 0x38]
mov ebp, ecx
mov ebx, esi
mov dword [esp + 0x28], ebp
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x403964
lea eax, [esp + 0x24]
push eax
push esi
push esi
push ebp
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x403959
push esi
lea eax, [esp + 0x10]
push eax
push esi
push 2
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40394f
mov eax, dword [esp + 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
add eax, 4
push eax
push 0x40
call esi
mov ebp, eax
mov dword [esp + 0x2c], ebp
test ebp, ebp
je 0x40394d
push dword [esp + 0xc]
push 0x40
call esi
mov ebx, eax
test ebx, ebx
je 0x403942
push edi
push dword [esp + 0x10]
push 0x40
call esi
mov edi, eax
test edi, edi
je 0x40393a
push dword [esp + 0x40]
xor esi, esi
push dword [esp + 0x40]
inc esi
push ebp
mov dword [esp + 0x20], esi
call fcn.0049fa90
add esp, 0xc
mov ecx, esi
cmp dword [esp + 0x4c], 0
mov dword [esp + 0x24], ecx
jbe 0x403933
mov edx, dword [esp + 0x18]
mov eax, ecx
mov ecx, dword [esp + 0x40]
bswap eax
mov dword [ecx + ebp], eax
lea eax, [ecx + 4]
push dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
push edi
push eax
push ebp
push dword [esp + 0x48]
call fcn.0040364a
push dword [esp + 0x24]
push edi
push ebx
call fcn.0049fa90
mov eax, dword [esp + 0x64]
add esp, 0x20
cmp eax, esi
mov esi, dword [esp + 0x10]
jbe 0x4038f9
dec eax
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push esi
push edi
push esi
push edi
push dword [esp + 0x48]
call fcn.0040364a
mov esi, dword [esp + 0x24]
add esp, 0x14
xor ebp, ebp
test esi, esi
je 0x4038d8
mov edx, edi
mov ecx, ebx
sub edx, ebx
mov al, byte [edx + ecx]
xor byte [ecx], al
inc ebp
mov esi, dword [esp + 0x10]
inc ecx
cmp ebp, esi
jb 0x4038c9
cmp dword [esp + 0x50], 0
je 0x4038ee
push esi
push ebx
push edi
call fcn.0049fa90
mov esi, dword [esp + 0x1c]
add esp, 0xc
sub dword [esp + 0x20], 1
jne 0x4038a1
mov ebp, dword [esp + 0x30]
cmp dword [esp + 0x4c], esi
cmovb esi, dword [esp + 0x4c]
push esi
push ebx
push dword [esp + 0x50]
call fcn.0049fa90
mov eax, dword [esp + 0x58]
add esp, 0xc
add dword [esp + 0x48], esi
sub eax, esi
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x14]
inc ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x24], ecx
test eax, eax
jne 0x40385c
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, dword [esp + 0x10]
xor esi, esi
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push esi
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x24
ret
Function at 0x4039a6
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
sub esp, 0x34
push ebx
push esi
mov esi, dword [esp + 0x40]
mov eax, edx
push edi
push 0x10
mov edi, ecx
mov dword [esp + 0x10], eax
pop ecx
xor ebx, ebx
cmp esi, ecx
jbe 0x403b0c
lea eax, [esp + 0x10]
push eax
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x403b24
push ebx
push dword [esp + 0x4c]
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x403b00
push ebp
lea ebp, [esi + 0xf]
shr ebp, 4
and esi, 0xf
push 0x10
pop eax
cmovne eax, esi
mov esi, dword [esp + 0x10]
mov dword [esp + 0x48], eax
cmp ebp, 2
jbe 0x403a2a
lea eax, [ebp - 2]
mov edx, esi
push ebx
push eax
mov ecx, edi
call fcn.0040396d
pop ecx
pop ecx
test eax, eax
je 0x403aff
mov eax, dword [esp + 0x48]
lea ecx, [ebp - 2]
add eax, 0x10
shl ecx, 4
push eax
add ecx, esi
lea eax, [esp + 0x28]
push ecx
push eax
mov dword [esp + 0x2c], ecx
call fcn.0049fa90
mov esi, dword [esp + 0x54]
lea ecx, [esp + 0x40]
push 0x10
pop eax
sub eax, esi
add ecx, esi
push eax
push ebx
push ecx
mov dword [esp + 0x34], eax
call fcn.0049ee30
add esp, 0x18
mov dword [esp + 0x18], 0x10
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x28]
push eax
push ebx
push ebx
push ebx
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x403aff
push dword [esp + 0x1c]
movups xmm1, xmmword [esp + 0x28]
lea eax, [esp + 0x28]
movups xmm0, xmmword [esp + 0x38]
add eax, esi
push eax
lea eax, [esp + 0x3c]
pxor xmm1, xmm0
add eax, esi
push eax
movups xmmword [esp + 0x30], xmm1
call fcn.0049fa90
add esp, 0xc
mov dword [esp + 0x1c], 0x10
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x38]
push eax
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ebx, eax
test ebx, ebx
je 0x403aff
mov edi, dword [esp + 0x20]
lea esi, [esp + 0x34]
push dword [esp + 0x48]
lea eax, [esp + 0x28]
shl ebp, 4
push eax
mov eax, dword [esp + 0x18]
movsd dword es:[edi], dword [esi]
add eax, 0xfffffff0
add eax, ebp
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0049fa90
add esp, 0xc
pop ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x403b24
jne 0x403b24
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x44]
push ecx
push eax
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ebx, eax
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x34
ret