joyce8/EMBER2024-capa huggingface dataset:
Function at 0x482d1c
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.004049f4
mov eax, dword [ebp - 8]
call fcn.004049f4
xor eax, eax
push ebp
push 0x482ea5
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, ebx
call fcn.00404544
mov dword [ebp - 0x1c], 0xff
mov eax, dword [ebp - 4]
call fcn.00404804
test eax, eax
jle 0x482e82
lea eax, [ebp - 4]
mov edx, 0x482ebc
call fcn.0040480c
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
call fcn.00404a5c
push eax
call sub.version.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jle 0x482e82
mov eax, dword [ebp - 0x14]
call fcn.00402a58
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x482e7b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 4]
call fcn.00404a5c
push eax
call sub.version.dll_GetFileVersionInfoA
test eax, eax
je 0x482e62
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x482ec0
mov eax, dword [ebp - 0xc]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x482e3a
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
movzx eax, word [eax]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
call fcn.00407474
movzx eax, ax
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x2c], eax
mov byte [ebp - 0x28], 0xb
lea edx, [ebp - 0x3c]
mov ecx, 2
mov eax, 0x482ee4
call fcn.00409ba0
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 8]
call fcn.004045dc
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
call fcn.00404a5c
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x482e62
mov edx, ebx
mov eax, dword [ebp - 0x10]
call fcn.00409688
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x482e82
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.00402a88
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x482eac
lea eax, [ebp - 0x24]
call fcn.00404544
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404568
ret
Function at 0x4836f0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov ebx, ecx
mov esi, edx
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.004030ac
mov dword [ebp - 0x48], 0x44
mov dword [ebp - 0x1c], 1
mov word [ebp - 0x18], 1
xor eax, eax
push ebp
push 0x48378f
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0x30
push 0
push 0
push 0
mov eax, esi
call fcn.00404a04
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test bl, bl
jne 0x483759
mov bl, 1
jmp 0x483785
push 0xffffffffffffffff
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_WaitForSingleObject
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4837a2
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x483dec
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, dword [ebp + 8]
mov eax, ebx
call fcn.00404544
mov eax, 0x104
call fcn.0040969c
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push edi
push esi
call sub.shell32.dll_SHGetSpecialFolderLocation
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.shell32.dll_SHGetPathFromIDListA
test eax, eax
je 0x483e36
mov edx, ebx
mov eax, dword [ebp - 8]
call fcn.00409688
mov eax, dword [ebp - 8]
call fcn.004096f8
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 4
Function at 0x487978
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
mov ebx, eax
xor eax, eax
push ebp
push 0x487ac9
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebx + 0x3c4], 0
jne 0x4879b6
push 0x487ae0
xor ecx, ecx
mov edx, dword [0x47d488]
mov eax, ebx
call fcn.00483da8
mov dword [ebx + 0x3c4], eax
mov eax, dword [ebx + 0x3c4]
mov eax, dword [eax + 0x2fc]
mov edx, 0x487af0
call fcn.0045ad64
mov eax, dword [ebx + 0x3c4]
call fcn.0047737c
mov eax, dword [ebx + 0x328]
mov eax, dword [eax + 0x208]
xor edx, edx
call fcn.0043dc14
mov edx, 0x487b1c
call fcn.0043db70
lea edx, [ebp - 0x14]
mov eax, dword [0x48a3fc]
mov eax, dword [eax]
call fcn.0047b098
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x10]
call fcn.004092f8
mov eax, dword [ebp - 0x10]
call fcn.00409468
mov eax, dword [0x48a3fc]
mov eax, dword [eax]
call fcn.0047a81c
lea eax, [ebp - 0xc]
mov edx, 0x487b34
call fcn.004045dc
push 1
mov eax, dword [ebp - 0xc]
call fcn.00404a04
push eax
call sub.kernel32.dll_WinExec
lea eax, [ebp - 4]
mov edx, 0x487b58
call fcn.004045dc
lea eax, [ebp - 8]
mov edx, 0x487b6c
call fcn.004045dc
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00483f7c
mov eax, dword [ebx + 0x328]
mov eax, dword [eax + 0x208]
xor edx, edx
call fcn.0043dc14
mov edx, 0x487b80
call fcn.0043db70
mov dl, 1
mov eax, dword [ebx + 0x350]
mov ecx, dword [eax]
call dword [ecx + 0x64]
mov eax, dword [ebx + 0x3c4]
call fcn.004771d4
push 0x40
push 0x487b8c
push 0x487b9c
push 0
call sub.user32.dll_MessageBoxA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x487ad0
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.00404568
ret
Function at 0x401820
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [0x41c264]
push ebx
push esi
push edi
push eax
mov eax, dword [ebp + 8]
call fcn.00401720
test eax, eax
mov dword [esp + 0x18], eax
je 0x4019a8
mov eax, dword [0x41c288]
lea ecx, [esp + 0xc]
push ecx
push 0xe
call fcn.00402940
lea edx, [esp + 0xc]
mov esi, eax
mov eax, dword [0x41c288]
push edx
push 0xf
mov dword [esp + 0x1c], esi
call fcn.00402940
mov edi, eax
lea eax, [esp + 0xc]
push eax
mov eax, dword [0x41c288]
push 1
mov dword [esp + 0x24], edi
call fcn.00402940
test esi, esi
mov dword [esp + 0x10], eax
je 0x4019a8
test edi, edi
je 0x4019a8
test eax, eax
je 0x4019a8
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x10830
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 8]
mov esi, eax
mov dword [esi], ecx
mov dword [esi + 4], edx
mov eax, dword [edi]
test eax, eax
je 0x4018d9
push eax
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x4018db
xor eax, eax
mov ecx, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov eax, dword [edi]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [esi + 8], eax
mov edx, dword [ecx]
mov ecx, dword [0x41c290]
push ecx
mov ecx, dword [0x41c238]
mov dword [esi + 0x14], edx
mov edx, dword [esi]
push eax
mov byte [esi + 0x20], 0
mov byte [esi + 0x21], 0
mov eax, dword [edx + 0x18]
push eax
push ecx
lea edx, [esi + 0x1002a]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
call fcn.00403470
test eax, eax
je 0x401933
mov edi, dword [esi]
push eax
call fcn.00402be0
jmp 0x401935
xor eax, eax
xor ecx, ecx
cmp eax, ecx
mov dword [esi + 0x28], eax
jne 0x401943
call fcn.00407a20
push ecx
push ecx
push esi
push 0x402620
push ecx
push ecx
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0xc]
push eax
push 0
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
push esi
push 0
call ebx
push eax
call edi
mov eax, dword [esp + 0x10]
push eax
push 0
call ebx
push eax
call edi
mov ecx, dword [esp + 0x1c]
push ecx
push 0
call ebx
push eax
call edi
mov edx, dword [esp + 0x14]
push edx
push 0
call ebx
push eax
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x401c70
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 8]
sub esp, 0x14
cmp dword [eax + 4], 0
push ebx
push esi
push edi
je 0x401e0d
mov eax, dword [0x41c288]
lea ecx, [esp + 0x14]
push ecx
push 0xe
call fcn.00402940
lea edx, [esp + 0x14]
mov esi, eax
mov eax, dword [0x41c288]
push edx
push 0xf
mov dword [esp + 0x20], esi
call fcn.00402940
mov edi, eax
lea eax, [esp + 0x14]
push eax
mov eax, dword [0x41c288]
push 1
mov dword [esp + 0x24], edi
call fcn.00402940
test esi, esi
mov dword [esp + 0x10], eax
je 0x401e0d
test edi, edi
je 0x401e0d
test eax, eax
je 0x401e0d
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x10830
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov esi, eax
mov eax, dword [ecx + 4]
test eax, eax
je 0x401d15
mov edx, dword [eax]
cmp word [edx], 0
je 0x401d3a
mov eax, dword [eax + 4]
test eax, eax
jne 0x401d06
xor eax, eax
mov ecx, dword [esp + 0x10]
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
mov eax, dword [edi]
test eax, eax
je 0x401d3e
push eax
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x401d40
mov eax, edx
jmp 0x401d17
xor eax, eax
mov dword [esi + 0xc], eax
mov edx, dword [edi]
mov eax, dword [esp + 0x18]
mov dword [esi + 0x10], edx
mov ecx, dword [eax]
mov edx, dword [0x41c290]
xor eax, eax
push edx
mov dword [esi + 0x14], ecx
mov ecx, dword [esi]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [0x41c238]
mov byte [esi + 0x20], 1
mov byte [esi + 0x21], 0
mov edx, dword [ecx + 0x18]
push edx
push eax
lea ecx, [esi + 0x1002a]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
call fcn.00403470
test eax, eax
je 0x401d9c
mov edi, dword [esi]
push eax
call fcn.00402be0
jmp 0x401d9e
xor eax, eax
test eax, eax
mov dword [esi + 0x28], eax
jne 0x401daa
call fcn.00407a20
push 0
push 0
push esi
push 0x402620
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0xc]
push eax
push 0
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
push esi
push 0
call ebx
push eax
call edi
mov edx, dword [esp + 0x10]
push edx
push 0
call ebx
push eax
call edi
mov eax, dword [esp + 0x1c]
push eax
push 0
call ebx
push eax
call edi
mov ecx, dword [esp + 0x18]
push ecx
push 0
call ebx
push eax
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x402680
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ecx
lea eax, [esi + 0xc]
push eax
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0xf0000000
push 0x18
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x4026b7
mov dword [esi], eax
lea ecx, [esi + 0x28]
push ecx
push 0xa
mov eax, esi
mov dword [esi + 8], 0x41f000
call fcn.00402940
mov dword [esi + 0x24], eax
mov eax, esi
pop ecx
ret

Function at 0x4026e0
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push edi
mov edi, dword [0x41c288]
cmp dword [edi], 0
jne 0x402706
push 0xf0000000
push 0x18
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x402706
mov dword [edi], eax
pop edi
ret
push esi
push 0x10
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x402721
pop esi
pop edi
ret
push 0x10
push 0
push esi
call fcn.00401100
mov eax, dword [edi]
add esp, 0xc
push esi
push 0x10
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
ret

Function at 0x402750
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt

Disassembly:
sub esp, 8
push esi
mov esi, dword [0x41c288]
cmp dword [esi], 0
jne 0x402780
push 0xf0000000
push 0x18
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x402780
mov dword [esi], eax
xor al, al
pop esi
add esp, 8
ret 4
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
lea eax, [esp + 4]
push eax
mov eax, dword [esi]
push 0
push 0
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x4027ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
pop esi
add esp, 8
ret 4
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 4]
push 0x80
lea ecx, [esp + 0xc]
push ecx
push edx
push 0
push 0
push 0
push eax
mov dword [esp + 0x24], 0x75
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x4027f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor al, al
pop esi
add esp, 8
ret 4
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test eax, eax
je 0x40279e
mov al, 1
pop esi
add esp, 8
ret 4
Function at 0x402810
Capabilities:
Contain obfuscated stackstrings
Create new key via cryptacquirecontext
Encrypt data using aes via winapi

Disassembly:
sub esp, 0x4c
cmp dword [esi], 0
mov al, 0x5e
mov byte [esp], 0xea
mov byte [esp + 1], 0x58
mov byte [esp + 2], 0x98
mov byte [esp + 3], 0x9e
mov byte [esp + 4], 0x15
mov byte [esp + 5], 0xca
mov byte [esp + 6], 0x2e
mov byte [esp + 7], 0x43
mov byte [esp + 8], 0x67
mov byte [esp + 9], 0x7a
mov byte [esp + 0xa], 0x46
mov byte [esp + 0xb], 0xc8
mov byte [esp + 0xc], 0x6b
mov byte [esp + 0xd], 0x34
mov byte [esp + 0xe], 0x4f
mov byte [esp + 0xf], 0xfe
mov byte [esp + 0x10], 0x9d
mov byte [esp + 0x11], al
mov byte [esp + 0x12], 0x17
mov byte [esp + 0x13], 0xc2
mov byte [esp + 0x14], 0xb2
mov byte [esp + 0x15], 0x54
mov byte [esp + 0x16], 0xef
mov byte [esp + 0x17], 0x16
mov byte [esp + 0x18], al
mov byte [esp + 0x19], 0x4b
mov byte [esp + 0x1a], al
mov byte [esp + 0x1b], 0x38
mov byte [esp + 0x1c], 0x1f
mov byte [esp + 0x1d], 0xff
mov byte [esp + 0x1e], 0xc4
mov byte [esp + 0x1f], 0x6f
jne 0x4028d4
push 0xf0000000
push 0x18
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x4028d4
mov dword [esi], eax
xor al, al
add esp, 0x4c
ret
push 0x2c
lea eax, [esp + 0x24]
push 0
push eax
call fcn.00401100
push 0x20
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x40]
push edx
mov word [esp + 0x38], 0x208
mov word [esp + 0x3c], 0x6610
mov byte [esp + 0x40], 0x20
call fcn.00401140
mov edx, dword [esi]
add esp, 0x18
lea eax, [esi + 4]
push eax
push 0
push 0
push 0x2c
lea ecx, [esp + 0x30]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x40293a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407a20
add esp, 4
xor al, al
add esp, 0x4c
ret
mov al, 1
add esp, 0x4c
ret
Function at 0x402940
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov esi, eax
mov eax, dword [esi + 8]
test eax, eax
push edi
je 0x402987
mov ebx, dword [eax]
xor edi, edi
test ebx, ebx
jbe 0x402987
lea esp, [esp]
mov eax, dword [esi + 8]
push 8
lea ecx, [eax + edi*8 + 8]
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.00401140
movzx eax, word [esp + 0x1c]
add esp, 0xc
cmp eax, ebp
je 0x402993
add edi, 1
cmp edi, ebx
jb 0x402960
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 8
mov ecx, dword [esi + 8]
push 8
lea edx, [ecx + edi*8 + 8]
push edx
lea eax, [esp + 0x18]
push eax
call fcn.00401140
mov ax, word [esp + 0x20]
mov cx, word [esp + 0x1e]
add esp, 0xc
cmp ax, cx
jbe 0x402987
movzx ecx, cx
movzx edi, ax
sub edi, ecx
je 0x402987
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x402987
movzx edx, word [esp + 0x12]
add edx, dword [esi + 8]
push edi
push edx
push ebx
call fcn.00401140
add esp, 0xc
lea ebp, [esi + 0xc]
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.00402810
test al, al
je 0x402987
mov eax, dword [esp + 0x24]
push eax
push ebx
push 0
push 0
mov dword [eax], edi
mov eax, dword [esi + 4]
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x402a36
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407a20
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 8
mov eax, dword [esp + 0x24]
cmp edi, dword [eax]
je 0x402a4f
call fcn.00407a20
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 8
movzx ecx, word [esp + 0x16]
mov dword [eax], ecx
mov eax, dword [esi + 4]
test eax, eax
je 0x402a91
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test eax, eax
jne 0x402a8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407a20
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 8
mov dword [esi + 4], 0
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xc
ret 8

Function at 0x402ab0
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push esi
mov esi, dword [0x41c288]
cmp dword [esi], 0
jne 0x402ada
push 0xf0000000
push 0x18
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x402ada
mov dword [esi], eax
xor al, al
pop esi
ret 8
mov eax, dword [esp + 8]
mov ecx, dword [esi]
push edi
push 0
push 0
push 0x2c
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x402aff
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
pop esi
ret 8
mov edx, dword [esp + 0xc]
mov eax, dword [edi]
push 0
push edx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x402af3
mov al, 1
pop esi
ret 8
Function at 0x4034a0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
mov eax, dword [0x41c25c]
push ebx
xor ebx, ebx
push esi
mov esi, dword [eax]
xor ecx, ecx
xor edx, edx
cmp esi, ebx
push edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
je 0x40352d
nop
mov eax, dword [esi]
mov eax, dword [eax + 0x34]
cmp eax, ebx
je 0x403526
lea esp, [esp]
add ecx, dword [eax + 0x10038]
mov dword [esp + 0x14], ecx
add edx, dword [eax + 0x10034]
mov dword [esp + 0x10], edx
mov edi, dword [eax + 0x10048]
add dword [esp + 0x18], edi
mov edi, dword [eax + 0x1004c]
adc dword [esp + 0x1c], edi
mov edi, dword [eax + 0x10040]
add dword [esp + 0x20], edi
mov edi, dword [eax + 0x10044]
adc dword [esp + 0x24], edi
mov eax, dword [eax + 0x10050]
cmp eax, ebx
jne 0x4034e0
mov esi, dword [esi + 4]
cmp esi, ebx
jne 0x4034d0
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push ebx
lea ecx, [esp + 0x10]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push 0xfffffffffffffff5
call edi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
call esi
test eax, eax
je 0x4035ce
cmp dword [esp + 0xc], 4
jb 0x4035ce
push ebx
lea eax, [esp + 0x10]
push eax
push 4
lea ecx, [esp + 0x1c]
push ecx
push 0xfffffffffffffff5
call edi
push eax
call esi
push ebx
lea edx, [esp + 0x10]
push edx
push 8
lea eax, [esp + 0x24]
push eax
push 0xfffffffffffffff5
call edi
push eax
call esi
push ebx
lea ecx, [esp + 0x10]
push ecx
push 8
lea edx, [esp + 0x2c]
push edx
push 0xfffffffffffffff5
call edi
push eax
call esi
test eax, eax
je 0x4035b8
cmp dword [esp + 0xc], 8
jb 0x4035b8
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.00407a20
add esp, 8
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407a20
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 6
jne 0x403638
push ebx
lea edx, [esp + 0x10]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push 4
call esi
push ebx
lea ecx, [esp + 0x10]
push ecx
push 4
lea edx, [esp + 0x1c]
push edx
push 4
call esi
push ebx
lea eax, [esp + 0x10]
push eax
push 8
lea ecx, [esp + 0x24]
push ecx
push 4
call esi
push ebx
lea edx, [esp + 0x10]
push edx
push 8
lea eax, [esp + 0x2c]
push eax
push 4
call esi
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push ecx
push edx
call fcn.00407a20
add esp, 8
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
call edi
push eax
call fcn.00407a20
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
Function at 0x403b70
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 2
lea edx, [esp + 0x14]
push edx
xor ecx, ecx
push ecx
xor eax, eax
push eax
push esi
call edi
test eax, eax
je 0x403bf9
cmp dword [esp + 0x14], 0
jg 0x403ba5
jl 0x403b9e
cmp dword [esp + 0x10], 4
jae 0x403ba5
mov al, 1
pop edi
add esp, 0x18
ret
push 2
push 0
or ecx, 0xffffffff
push ecx
mov eax, 0xfffffffc
push eax
push esi
call edi
test eax, eax
je 0x403bf9
push 0
lea eax, [esp + 0xc]
push eax
push 4
lea ecx, [esp + 0x18]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403bf9
cmp dword [esp + 8], 4
jne 0x403bf9
push 4
lea edx, [esp + 0x10]
push 0x41a020
push edx
call fcn.00403b20
add esp, 0xc
neg eax
sbb eax, eax
neg eax
pop edi
add esp, 0x18
ret
xor al, al
pop edi
add esp, 0x18
ret
Function at 0x4043f0
Capabilities:
Encrypt or decrypt via wincrypt
Read file on windows
Write file on windows

Disassembly:
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0xc]
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x18]
push esi
xor esi, esi
push esi
lea eax, [esp + 0xc]
push eax
push ecx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4044b9
mov eax, dword [esp + 8]
test eax, eax
jne 0x404428
mov al, 1
pop esi
pop ebp
add esp, 0xc
ret
cmp eax, dword [edi + 0x14]
jae 0x404450
mov ecx, eax
and ecx, 0xf
je 0x404450
mov esi, 0x10
sub esi, ecx
mov ecx, dword [edi + 0xc]
push esi
add ecx, eax
push 0
push ecx
call fcn.00401100
mov eax, dword [esp + 0x14]
add esp, 0xc
mov ecx, dword [edi + 0xc]
add eax, esi
push eax
lea edx, [esp + 0x10]
push edx
push ecx
push 0
push 0
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x4044b9
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
push 0
push 0
push ecx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x4044b9
mov ecx, dword [esp + 8]
mov edx, dword [edi + 0xc]
push 0
lea eax, [esp + 0x14]
push eax
add ecx, esi
push ecx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4044b9
mov eax, dword [esp + 8]
add eax, esi
cmp dword [esp + 0x10], eax
jae 0x404420
pop esi
xor al, al
pop ebp
add esp, 0xc
ret