joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5c14d0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x113ebd0]
xor edx, edx
cmp eax, edx
jne 0x5c14f6
xor eax, eax
mov byte [eax + 0x113ead0], al
inc eax
cmp eax, 0x100
jl 0x5c14de
mov dword [0x113ebd0], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x113ead0
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x5c1587
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x5c155a
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x5c1528
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x5c1590
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x5c15e3
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x5c15ca
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x5c7f90
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x6019be
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.005c88b0
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x10214ec
call fcn.005f26ba
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x5c8023
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.005f26ba
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x5c801c
push 0
mov ecx, eax
call fcn.005bf100
mov dword [esi + 0xc], eax
jmp 0x5c8025
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x5c8025
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x5f4d4a
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x5f4d82
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.005f2dd4
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.005f2dac
jmp 0x5f4d8e
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x5f6438
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 0x5f647a
call fcn.005fbf2f
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x5f647a
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x5f6471
xor eax, eax
jmp 0x5f6482
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.005f6488
pop edi
pop esi
pop ebx
ret 4

Function at 0x5fc45f
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 0x5fc48d
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x5fc4ab
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.005fc3c5
jmp 0x5fc4ab
mov eax, dword [esi + 0x14]
test eax, eax
je 0x5fc4ab
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.005fc3c5
test edi, edi
mov eax, edi
jne 0x5fc495
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401158
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push 0x40
mov esi, eax
xor ebx, ebx
lea eax, [ebp - 0x50]
push ebx
push eax
call fcn.0040d9a0
add esp, 0xc
cmp esi, ebx
mov dword [ebp - 0x54], 0x44
mov dword [ebp - 0x28], 0x80
je 0x401189
cmp byte [esi], bl
jne 0x40118b
xor esi, esi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp + 0xc]
push ebx
push ebx
push ebx
push ebx
push ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
pop esi
pop ebx
jne 0x4011ad
leave
ret
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret

Function at 0x4011bb
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x4212e0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 9
mov ebx, ecx
pop ecx
mov esi, str.7E1338DA_434A_493b_A064_8F16DC822650
lea edi, [ebp - 0x34]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, str._d.log
lea edi, [ebp - 0xc]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [ebp - 0x254]
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, 0x104
push esi
lea eax, [ebp - 0x23c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x23c]
call fcn.00404882
mov edi, eax
lea eax, [ebp - 0x23c]
sub eax, 4
add edi, eax
movzx eax, word [ebp - 0x250]
inc eax
cdq
push 7
pop ecx
idiv ecx
lea eax, [ebp - 0xc]
push edx
push eax
mov eax, esi
call fcn.00404833
pop ecx
pop ecx
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401262
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
movzx eax, word [ebp - 0x250]
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, esi
call fcn.00404833
pop ecx
pop ecx
push 4
push 1
push 0x40000000
lea eax, [ebp - 0x23c]
push eax
push ebx
call fcn.004047fe
test eax, eax
jge 0x401295
xor eax, eax
jmp 0x4012d3
push 2
lea eax, [ebp - 0x240]
xor esi, esi
push eax
push esi
push dword [ebx]
mov dword [ebp - 0x244], esi
mov dword [ebp - 0x240], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4012bf
call fcn.00404717
cmp dword [ebp + 8], esi
je 0x4012d0
lea eax, [ebp - 0x34]
push eax
add ebx, 4
call fcn.00404757
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b0c5
leave
ret 4
Function at 0x4012e4
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
lea ebp, [esp - 0x98]
sub esp, 0x118
mov eax, dword [0x4212e0]
xor eax, ebp
mov dword [ebp + 0x94], eax
cmp dword [ebx], 0
mov eax, dword [ebp + 0xa0]
mov dword [ebp - 0x70], eax
je 0x4013c8
push esi
push edi
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0xff
lea eax, [ebp - 0x6b]
push 0
push eax
mov byte [ebp - 0x6c], 0
call fcn.0040d9a0
movzx eax, word [ebp - 0x74]
push eax
movzx eax, word [ebp - 0x76]
push eax
movzx eax, word [ebp - 0x78]
push eax
movzx eax, word [ebp - 0x7a]
push eax
movzx eax, word [ebp - 0x7e]
push eax
movzx eax, word [ebp - 0x80]
push eax
mov esi, 0x100
push str._r_n_04d__02d__02d__02d:_02d:_02d_r_n
mov eax, esi
lea edi, [ebp - 0x6c]
call fcn.00404833
add esp, 0x28
mov ecx, edi
call fcn.00404882
mov ecx, esi
sub ecx, eax
push ecx
push dword [ebp - 0x70]
lea eax, [ebp + eax - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor eax, eax
cmp dword [ebx + 4], eax
je 0x4013a2
push esi
lea ecx, [ebp - 0x70]
push ecx
mov ecx, edi
push ecx
push eax
push 1
push eax
push dword [ebx + 8]
mov dword [ebp - 0x70], esi
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push esi
jmp 0x4013ab
lea ecx, [ebp - 0x6c]
call fcn.00404882
push eax
lea eax, [ebp - 0x6c]
push eax
push ebx
call fcn.0040472c
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
pop edi
pop esi
jne 0x4013c8
call fcn.00404717
mov ecx, dword [ebp + 0x94]
xor ecx, ebp
call fcn.0040b0c5
add ebp, 0x98
leave
ret 4

Function at 0x401f2d
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x88]
sub esp, 0x108
mov eax, dword [0x4212e0]
xor eax, ebp
mov dword [ebp + 0x84], eax
push esi
push 0x104
lea eax, [ebp - 0x80]
push eax
push 0
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push str..dat
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionA]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401f95
push edi
add esi, 0x18
mov eax, str.1F246B34_FD72_47ff_9640_24DD6664AAF6
lea edi, [ebp - 0x80]
call fcn.00404fcb
test eax, eax
pop edi
je 0x401f95
xor eax, eax
inc eax
jmp 0x401f97
xor eax, eax
mov ecx, dword [ebp + 0x84]
xor ecx, ebp
pop esi
call fcn.0040b0c5
add ebp, 0x88
leave
ret
Function at 0x402283
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x6ac]
sub esp, 0x72c
mov eax, dword [0x4212e0]
xor eax, ebp
mov dword [ebp + 0x6a8], eax
push esi
push edi
mov edi, edx
mov esi, ecx
lea eax, [edi + 0x7bc]
cmp esi, dword [eax + 4]
mov dword [ebp - 0x78], edi
jb 0x4022bc
push 0x80070057
call fcn.00403f71
imul esi, esi, 0xc
add esi, dword [eax]
lea eax, [ebp + 0x5a4]
push eax
push dword [esi]
mov eax, edi
call fcn.0040243b
test eax, eax
je 0x402424
mov edx, dword [esi]
lea ecx, [edi + 0x18]
push ebx
mov edi, 0x107
push edi
call fcn.00403255
test eax, eax
lea ebx, [edi - 3]
jne 0x4022f6
or edi, 0xffffffff
jmp 0x402313
mov ecx, dword [ebp - 0x78]
mov edx, dword [esi]
push edi
add ecx, 0x18
call fcn.00403255
test eax, eax
je 0x40230d
mov edi, dword [eax + 4]
jmp 0x40230f
xor edi, edi
test edi, edi
je 0x402352
lea eax, [ebp + 0x5a4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4023bb
and dword [ebp - 0x80], 0
and dword [ebp - 0x7c], 0
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp + 0x5a4]
push eax
call dword [sym.imp.imagehlp.dll_MapFileAndCheckSumA]
xor eax, eax
cmp edi, dword [ebp - 0x7c]
sete al
test eax, eax
je 0x4023bb
mov ecx, dword [ebp - 0x78]
mov edx, dword [esi]
push 0x106
add ecx, 0x18
call fcn.00403255
mov ecx, eax
add eax, 8
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea eax, [ebp + 0x4a0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp + 0x4a0]
push eax
lea eax, [ebp + 0x5a4]
push eax
push str.__s___s
mov eax, 0x30c
lea edi, [ebp - 0x74]
call fcn.00404833
push 0
push 0
mov eax, edi
call fcn.00401158
add esp, 0x14
test eax, eax
je 0x4023bb
mov dword [esi + 4], eax
xor eax, eax
inc eax
mov dword [esi + 8], eax
jmp 0x402423
push ebx
lea eax, [ebp + 0x39c]
push eax
push 0x8a
push 0
call dword [sym.imp.USER32.dll_LoadStringA]
push dword [esi]
lea eax, [ebp + 0x39c]
push eax
mov eax, ebx
lea edi, [ebp + 0x298]
call fcn.00404833
mov edi, dword [ebp - 0x78]
mov eax, dword [edi]
pop ecx
pop ecx
lea ecx, [ebp + 0x298]
push ecx
mov ecx, edi
call dword [eax]
mov edx, dword [esi]
push 0x112
lea ecx, [edi + 0x18]
call fcn.00403255
test eax, eax
je 0x402410
mov eax, dword [eax + 4]
jmp 0x402412
xor eax, eax
cmp eax, 2
jne 0x402421
mov dword [edi + 0x7cc], 1
xor eax, eax
pop ebx
mov ecx, dword [ebp + 0x6a8]
pop edi
xor ecx, ebp
pop esi
call fcn.0040b0c5
add ebp, 0x6ac
leave
ret
Function at 0x402e4b
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
push edi
push 1
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.RegisterServiceProcess
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
push dword [ebp + 8]
call fcn.0040b7fc
pop ecx
mov edi, eax
push edi
xor esi, esi
push esi
push 0x100400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, esi
mov dword [ebp - 4], eax
je 0x402ef2
push 1
push esi
push esi
push esi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x402eb5
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x402e96
push 0x48
push 0xffffffffffffffff
push esi
lea eax, [ebp - 4]
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
test eax, eax
jne 0x402e96
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, dword [ebp - 8]
je 0x402ef2
push 0xffffffffffffffff
push 6
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x402ef8
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x99c
mov eax, dword [0x4212e0]
xor eax, esp
mov dword [esp + 0x998], eax
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
cmp byte [esi], bl
push edi
jne 0x403061
push 0x104
lea eax, [esp + 0x89c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x10]
push eax
lea edi, [esp + 0x89c]
call fcn.00403099
lea eax, [esp + 0x10]
push eax
call fcn.004030ed
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [esp + 0x10]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x402f7c
lea eax, [esp + 0x10]
call fcn.004031cf
xor eax, eax
jmp 0x403082
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402fa3
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x10]
call fcn.004031cf
mov eax, ebx
jmp 0x403082
push 0x90
lea eax, [esp + 0x20]
push ebx
push eax
call fcn.0040d9a0
add esp, 0xc
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x28], 2
jne 0x40300d
lea ecx, [esp + 0xb0]
call fcn.0040289e
lea ecx, [esp + 0xb0]
call fcn.00401697
test eax, eax
je 0x402fff
lea esi, [esp + 0xb0]
call fcn.0040181a
mov ecx, esi
call fcn.004018c0
lea edi, [esp + 0xb0]
call fcn.0040293a
jmp 0x40304a
lea eax, [esp + 0xb0]
push eax
call fcn.0040260f
lea ecx, [esp + 0xb0]
call fcn.00401697
test eax, eax
je 0x40303d
lea esi, [esp + 0xb0]
call fcn.0040181a
mov ecx, esi
call fcn.004018c0
lea eax, [esp + 0xb0]
push eax
call fcn.00402715
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
jmp 0x402f93
push 0x2f
push esi
call fcn.0040b62e
test eax, eax
pop ecx
pop ecx
je 0x40307b
mov ecx, esi
call fcn.00402a28
jmp 0x402f75
push esi
call fcn.00402e4b
pop ecx
mov ecx, dword [esp + 0x9a4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040b0c5
mov esp, ebp
pop ebp
ret 0x10

Function at 0x403f14
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x403f2b
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x403f60
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x403f5c
cmp edi, eax
jae 0x403f60
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x403f4e
cmp edi, eax
jb 0x403f64
xor eax, eax
jmp 0x403f6e
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret
Function at 0x404757
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using rc4 via winapi
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
push edi
push 0
push 1
mov edi, str.Microsoft_Base_Cryptographic_Provider_v1.0
push edi
push 0
push ebx
call esi
test eax, eax
jne 0x404787
push 8
push 1
push edi
xor edi, edi
push edi
push ebx
call esi
test eax, eax
je 0x4047f6
jmp 0x404789
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push edi
push 0x8003
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4047eb
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4047e2
lea eax, [ebx + 4]
push eax
push edi
push dword [ebp - 4]
push 0x6801
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x4047e2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor eax, eax
inc eax
jmp 0x4047f8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push edi
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [ebx], edi
xor eax, eax
pop edi
pop esi
leave
ret 4

Function at 0x404fcb
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
xor ebx, ebx
cmp eax, ebx
je 0x404fe1
cmp byte [eax], bl
je 0x404fe1
push eax
push esi
call fcn.004052cc
test eax, eax
je 0x405024
cmp edi, ebx
je 0x405028
cmp byte [edi], bl
je 0x405028
push edi
lea eax, [esi + 0x38]
call fcn.004040c3
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405028
mov eax, esi
call fcn.00405116
test eax, eax
jne 0x405028
cmp dword [esi + 0x30], ebx
je 0x405024
push dword [esi + 0x34]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebx
push dword [esi + 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [esi + 0x30], ebx
xor eax, eax
pop ebx
ret
xor eax, eax
inc eax
pop ebx
ret

Function at 0x405048
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, eax
xor eax, eax
cmp dword [ebx + 0x30], eax
mov dword [ebp - 4], edi
je 0x40506f
lea ecx, [ebp - 4]
push ecx
push esi
push eax
push 1
push eax
push dword [ebx + 0x34]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x4050a1
lea ecx, [edi - 4]
xor edx, edx
xor eax, eax
test ecx, ecx
jbe 0x405089
movzx edi, byte [esi + eax + 4]
imul edx, edx, 0x21
add edx, edi
inc eax
cmp eax, ecx
jb 0x40507a
cmp dword [esi], edx
jne 0x4050a1
cmp dword [esi + 4], 0x10000
jne 0x4050a1
lea edi, [esi + 8]
push ebx
call fcn.00405260
jmp 0x4050a3
xor eax, eax
pop edi
leave
ret
Function at 0x405116
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, eax
mov eax, dword [ebx + 0x3c]
cmp eax, 0xffffffff
push edi
je 0x405133
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx + 0x3c], 0xffffffff
mov eax, dword [ebx + 0x38]
xor edi, edi
push edi
push edi
push 3
push edi
push 1
push Ordinal_3
push eax
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x4051b1
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 4
mov dword [ebp - 4], eax
jb 0x4051a8
push esi
push eax
call fcn.0040b6d4
mov esi, eax
cmp esi, edi
pop ecx
je 0x4051a7
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4051a0
mov eax, dword [ebp - 4]
call fcn.00405048
test eax, eax
je 0x4051a0
mov dword [ebx + 0x40], edi
mov dword [ebp - 0xc], 1
push esi
call fcn.0040b6cf
pop ecx
pop esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
pop edi
pop ebx
leave
ret

Function at 0x4051b8
Capabilities:
Check if file exists
Get file attributes
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, eax
push ebx
call fcn.004055c5
add eax, 8
push eax
mov dword [ebp - 4], eax
call fcn.0040b6d4
mov edi, eax
xor esi, esi
cmp edi, esi
pop ecx
je 0x40525b
call fcn.00405405
cmp dword [ebx + 0x3c], 0xffffffff
jne 0x40521b
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405203
push 0x80
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [ebx + 0x38]
push esi
push esi
push 2
push esi
push esi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebx + 0x3c], eax
mov eax, dword [ebx + 0x3c]
cmp eax, 0xffffffff
je 0x405254
push esi
push esi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov dword [ebx + 0x40], esi
push edi
call fcn.0040b6cf
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4052cc
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push 0
push 1
mov esi, str.Microsoft_Base_Cryptographic_Provider_v1.0
push esi
push 0
lea edi, [ebp + 0x30]
push edi
call ebx
test eax, eax
jne 0x4052fd
push 8
push 1
push esi
push eax
push edi
call ebx
test eax, eax
je 0x405321
push dword [esp + 0x18]
mov esi, ebp
call fcn.0040547e
test eax, eax
mov dword [ebp + 0x34], eax
je 0x405314
xor eax, eax
inc eax
jmp 0x405323
push 0
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
and dword [edi], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 8

Function at 0x405405
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push ecx
test edi, edi
jne 0x405418
push ebx
call fcn.004055c5
add eax, 8
leave
ret
push esi
lea esi, [edi + 8]
push ebx
call fcn.00405563
mov esi, eax
add esi, 8
xor eax, eax
lea ecx, [esi - 4]
cmp ecx, eax
mov dword [edi + 4], 0x10000
mov dword [ebp - 4], eax
jbe 0x40544f
mov edx, dword [ebp - 4]
imul eax, eax, 0x21
movzx edx, byte [edi + edx + 4]
add eax, edx
inc dword [ebp - 4]
cmp dword [ebp - 4], ecx
jb 0x40543a
mov dword [edi], eax
xor eax, eax
cmp dword [ebx + 0x30], eax
mov dword [ebp - 4], esi
je 0x405472
push esi
lea ecx, [ebp - 4]
push ecx
push edi
push eax
push 1
push eax
push dword [ebx + 0x34]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x405475
xor eax, eax
inc eax
neg eax
sbb eax, eax
and eax, esi
pop esi
leave
ret

Function at 0x40547e
Capabilities:
Encrypt data using rc4 via winapi
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
lea eax, [ebp - 4]
push eax
xor edi, edi
push edi
push edi
push 0x8003
push dword [esi + 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4054ec
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4054e3
lea eax, [ebp + 8]
push eax
push edi
push dword [ebp - 4]
mov dword [ebp + 8], edi
push 0x6801
push dword [esi + 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x4054e3
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp + 8]
jmp 0x4054ee
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor eax, eax
pop edi
leave
ret 4