joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403c2d
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 0xf0000000
push 0x18
xor ebx, ebx
mov dword [ebp - 0xc], 1
push ebx
push ebx
lea eax, [ebp - 8]
mov edi, edx
push eax
mov esi, ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x403cc0
mov ecx, dword [ebp - 8]
lea eax, [ebp - 4]
push ebx
push eax
push ebx
push 0x10
push dword [ebp + 0xc]
mov edx, 0x660e
call fcn.0040342f
add esp, 0x14
test eax, eax
je 0x403cb6
push ebx
lea eax, [ebp - 0xc]
push eax
push 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x403cad
mov edx, edi
mov ecx, dword [ebp - 4]
push dword [ebp + 0x14]
push dword [ebp + 8]
cmp dword [ebp + 0x18], ebx
je 0x403ca4
call fcn.00403b2d
jmp 0x403ca9
call fcn.004039a6
pop ecx
mov esi, eax
pop ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x403ed9
Capabilities:
Create new key via cryptacquirecontext
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
push 0xf0000000
push 0x18
xor edi, edi
lea eax, [ebp - 8]
push edi
push edi
push eax
mov esi, ecx
mov dword [ebp - 0xc], edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x403f37
lea eax, [ebp - 4]
push eax
push edi
push edi
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x403f2d
push edi
lea eax, [ebp - 0xc]
push eax
push edi
push 2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push edi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
leave
ret

Function at 0x403f3e
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
push 0xf0000000
push 0x18
xor edi, edi
mov dword [ebp - 0x10], 4
push edi
push edi
lea eax, [ebp - 8]
mov dword [ebp - 0xc], edi
push eax
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x403fa5
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x403f9b
push edi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push edi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0xc]
pop edi
shr eax, 3
pop esi
leave
ret

Function at 0x403fb0
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
push 0xf0000000
push 0x18
xor edi, edi
mov dword [ebp - 0x10], 4
push edi
push edi
lea eax, [ebp - 8]
mov dword [ebp - 0xc], edi
push eax
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x404017
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x40400d
push edi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 9
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push edi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0xc]
pop edi
shr eax, 3
pop esi
leave
ret
Function at 0x4040eb
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
push 0xf0000000
push 0x18
xor ebp, ebp
mov dword [esp + 0x20], 1
push ebp
push ebp
lea eax, [esp + 0x24]
mov edi, edx
push eax
mov esi, ecx
mov ebx, ebp
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x404226
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push ebp
push eax
push ebp
push 0x10
push esi
mov edx, 0x660e
call fcn.0040342f
add esp, 0x14
test eax, eax
je 0x404206
mov esi, dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
lea eax, [esp + 0x18]
push ebp
push eax
push 4
push dword [esp + 0x1c]
call esi
test eax, eax
je 0x4041f4
push ebp
push edi
push 1
push dword [esp + 0x1c]
call esi
test eax, eax
je 0x4041df
mov ebx, dword [esp + 0x28]
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, dword [esp + 0x2c]
mov esi, eax
mov dword [edi], esi
test esi, esi
je 0x404202
mov ebp, dword [esp + 0x30]
push ebx
push dword [esp + 0x28]
push esi
mov dword [ebp], ebx
call fcn.0049fa90
add esp, 0xc
push ebp
push esi
xor esi, esi
push esi
push 1
push esi
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ebx, eax
test ebx, ebx
jne 0x4041d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptDecrypt__0x_08x__n
call fcn.00409cda
pop ecx
pop ecx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [edi], eax
mov dword [ebp], esi
xor ebp, ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x404219
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__IV___0x_08x__n
call fcn.00409cda
pop ecx
pop ecx
jmp 0x4041d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__MODE___0x_08x__n
jmp 0x4041eb
mov ebx, ebp
jmp 0x4041d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_crypto_genericAES128Decrypt___kull_m_crypto_hkey__0x_08x__n
call fcn.00409cda
pop ecx
pop ecx
push ebp
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x404239
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptAcquireContext__0x_08x__n
call fcn.00409cda
pop ecx
pop ecx
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x10
ret
Function at 0x4042d5
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
xor esi, esi
mov dword [esp + 0x18], str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
xor ebp, ebp
mov dword [esp + 0x14], esi
inc ebp
mov dword [esp + 0x20], esi
push edi
mov edi, edx
mov dword [esp + 0x20], ebp
mov ebx, ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], ebp
call fcn.0040f914
mov dword [esp + 0x18], eax
test eax, eax
je 0x4043aa
push 8
push dword [esp + 0x24]
push dword [esp + 0x24]
push eax
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x40438d
lea eax, [esp + 0x14]
push eax
push ebp
push esi
push dword [esp + 0x48]
push dword [esp + 0x48]
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x40436f
push dword [esp + 0x44]
lea eax, [esp + 0x1c]
mov edx, edi
push eax
mov ecx, ebx
call fcn.004043b4
pop ecx
pop ecx
push dword [esp + 0x14]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x404382
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptImportKey__0x_08x__n
call fcn.00409cda
pop ecx
pop ecx
mov ecx, dword [esp + 0x10]
call fcn.004035a7
jmp 0x4043a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptAcquireContext__0x_08x__n
call fcn.00409cda
pop ecx
pop ecx
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret

Function at 0x404ada
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 4], edx
mov dword [edi], esi
mov dword [ebx], eax
lea eax, [ebp + 0xc]
push eax
push esi
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x404b65
push esi
push ebx
push esi
push esi
push 1
push esi
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x404b5c
push dword [ebx]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi], eax
test eax, eax
je 0x404b5c
push dword [ebp + 8]
push dword [ebp - 4]
push eax
call fcn.0049fa90
add esp, 0xc
lea eax, [ebp + 8]
push dword [ebx]
push eax
push dword [edi]
push esi
push 1
push esi
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov esi, eax
test esi, esi
jne 0x404b5c
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [edi], eax
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x404b6c
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push ebp
mov ebp, dword [esp + 0x18]
push esi
push edi
mov edi, dword [esp + 0x1c]
xor esi, esi
push eax
push esi
push esi
mov dword [edi], esi
push ecx
mov dword [esp + 0x20], edx
mov dword [ebp], ebx
call dword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x404be2
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi], eax
test eax, eax
je 0x404bd8
push ebx
push dword [esp + 0x14]
push eax
call fcn.0049fa90
add esp, 0xc
push ebp
push dword [edi]
push esi
push 1
push esi
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov esi, eax
test esi, esi
jne 0x404bd8
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [edi], eax
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x4058e4
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
push 0x9c
push 0x51f078
call fcn.004bfc40
xor eax, eax
lea edi, [ebp - 0x4c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004057b1
add esp, 0x18
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
js 0x405a5a
push ecx
lea eax, [ebp - 0xac]
push eax
push ecx
push dword [ebp + 0x18]
push ecx
mov ecx, dword [ebp - 0x2c]
call fcn.00405881
add esp, 0x14
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
js 0x405a27
push dword [ebp - 0x24]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x405a34
push ebx
push 0x20
lea eax, [ebp - 0xac]
push eax
push dword [ebp - 0x24]
push esi
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
js 0x405a11
push 0x40
pop edi
push edi
push ebx
lea eax, [ebp - 0x8c]
push eax
call fcn.0049ee30
add esp, 0xc
mov dword [ebp - 0x8c], edi
mov dword [ebp - 0x88], 1
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x84], eax
push 0xc
pop ecx
mov dword [ebp - 0x80], ecx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], 0x10
push ebx
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
push ecx
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x8c]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0x28]
call dword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov edi, eax
mov dword [ebp - 0x20], edi
push dword [ebp - 0x28]
call dword [sym.imp.bcrypt.dll_BCryptDestroyKey]
jmp 0x405a1e
push edi
push str.ERROR_SkpEncryptionWorker___BCryptGenerateSymmetricKey:_0x_08x_n
call fcn.00409cda
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x405a34
push edi
push str.ERROR_SkpEncryptionWorker___SkpDeriveSymmetricKey:_0x_08x_n
call fcn.00409cda
pop ecx
pop ecx
push dword [ebp - 0x2c]
call dword [sym.imp.bcrypt.dll_BCryptDestroyKey]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
push dword [ebp - 0x38]
mov esi, dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
call esi
push ebx
push dword [ebp - 0x30]
call esi
jmp 0x405a67
push edi
push str.ERROR_SkpEncryptionWorker___SkpInitSymmetricEncryption:_0x_08x_n
call fcn.00409cda
pop ecx
pop ecx
or dword [ebp - 4], 0xffffffff
jmp 0x405a95
mov eax, edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406934
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0x9c
lea eax, [esp + 0x1c]
push ebx
push ebp
push esi
push edi
push 0x40
push 0x36
push eax
mov edi, edx
mov esi, ecx
xor ebp, ebp
call fcn.0049ee30
push 0x40
lea eax, [esp + 0x7c]
push 0x5c
push eax
call fcn.0049ee30
add esp, 0x18
mov edx, ebp
test edi, edi
je 0x406983
lea eax, [esp + 0x2c]
sub esi, eax
lea eax, [esp + 0x2c]
add eax, edx
mov cl, byte [esi + eax]
xor byte [eax], cl
xor byte [esp + edx + 0x6c], cl
inc edx
cmp edx, edi
jb 0x40696f
mov eax, dword [esp + 0xb4]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
add eax, 0x40
push eax
push 0x40
mov dword [esp + 0x18], eax
call ebx
mov dword [esp + 0x14], eax
test eax, eax
je 0x406aab
push 0x10
pop ecx
push dword [esp + 0xb4]
mov edi, eax
lea esi, [esp + 0x30]
push dword [esp + 0xb4]
add eax, 0x40
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.0049fa90
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x24]
push 0x14
push eax
push dword [esp + 0x24]
mov ecx, 0x8004
call fcn.004032e8
add esp, 0x18
test eax, eax
je 0x406aa1
mov eax, dword [esp + 0xc4]
mov ebp, dword [esp + 0xbc]
add eax, 0x54
add eax, ebp
push eax
push 0x40
mov dword [esp + 0x18], eax
call ebx
mov ebx, eax
test ebx, ebx
je 0x406a9f
cmp dword [esp + 0xb8], 0
lea esi, [esp + 0x6c]
push 0x10
pop ecx
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
push 5
lea edi, [ebx + 0x40]
pop ecx
lea esi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
je 0x406a4d
test ebp, ebp
je 0x406a4d
push ebp
push dword [esp + 0xbc]
lea eax, [ebx + 0x54]
push eax
call fcn.0049fa90
add esp, 0xc
cmp dword [esp + 0xc0], 0
je 0x406a78
mov eax, dword [esp + 0xc4]
test eax, eax
je 0x406a78
push eax
push dword [esp + 0xc4]
lea eax, [ebp + 0x54]
add eax, ebx
push eax
call fcn.0049fa90
add esp, 0xc
push 0x14
push dword [esp + 0xcc]
mov edx, ebx
mov ecx, 0x8004
push dword [esp + 0x18]
call fcn.004032e8
add esp, 0xc
mov ebp, eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x406aa1
xor ebp, ebp
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x9c
ret
Function at 0x406e14
Capabilities:
Encrypt data using dpapi

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
mov ebp, dword [esp + 0x2c]
push esi
push edi
xor edi, edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebp
cmp dword [esp + 0x4c], edi
je 0x406eb3
cmp dword [esp + 0x50], edi
je 0x406eb3
call fcn.00405aa6
mov esi, eax
test esi, esi
je 0x406f12
push dword [esp + 0x48]
mov edx, dword [esp + 0x50]
mov ecx, esi
push dword [esp + 0x48]
push dword [esp + 0x5c]
push ebx
push ebp
push dword [esp + 0x64]
call fcn.00406bdf
mov edi, eax
add esp, 0x18
test edi, edi
je 0x406eaa
mov ebx, dword [esp + 0x30]
test ebx, ebx
je 0x406eaa
cmp dword [esi + 0x30], 0
je 0x406eaa
cmp dword [esi + 0x2c], 0
je 0x406eaa
push dword [esi + 0x2c]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebx], eax
test eax, eax
je 0x406eaa
push dword [esi + 0x2c]
push dword [esi + 0x30]
push eax
call fcn.0049fa90
add esp, 0xc
mov ecx, esi
call fcn.00405b8a
jmp 0x406f12
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x44]
lea eax, [esp + 0x20]
push dword [esp + 0x44]
push 0
push eax
push dword [esp + 0x44]
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.CRYPT32.dll_CryptUnprotectData]
mov edi, eax
test edi, edi
je 0x406f12
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x48]
push eax
push 0x40
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [esp + 0x44]
mov dword [ecx], eax
test eax, eax
je 0x406f08
push dword [esi]
push dword [esp + 0x18]
push eax
call fcn.0049fa90
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x407baa
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
mov dword [esp + 0x20], edx
xor ebx, ebx
mov ecx, 0x8004
push edi
mov edi, ebx
mov eax, dword [esi + 0x1c]
cmp eax, 0x8009
cmove eax, ecx
mov ecx, eax
mov dword [esp + 0x28], eax
call fcn.00403ed9
mov ecx, dword [esi + 0x28]
call fcn.00403fb0
mov ecx, dword [esi + 0x28]
mov ebp, eax
mov dword [esp + 0x14], ebp
call fcn.00403f3e
add eax, ebp
push eax
push 0x40
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
mov dword [esp + 0x1c], ebp
test ebp, ebp
je 0x407d58
mov edx, dword [esp + 0x24]
lea eax, [esi + 0x34]
mov ecx, dword [esp + 0x28]
push 1
push dword [esp + 0x24]
push ebp
push dword [esi + 0x20]
push 0x10
push eax
push 0x14
call fcn.00403785
add esp, 0x1c
test eax, eax
je 0x407d51
mov ecx, dword [esi + 0x28]
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x14]
mov edx, ebp
push eax
push ebx
push dword [esp + 0x20]
call fcn.00403cc7
add esp, 0x10
test eax, eax
je 0x407d3e
mov eax, dword [esp + 0x14]
push ebx
add eax, ebp
push eax
push 1
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x407d19
mov eax, dword [esi + 0x4c]
push eax
push 0x40
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
test ebp, ebp
je 0x407d15
push dword [esp + 0x18]
push dword [esi + 0x48]
push ebp
call fcn.0049fa90
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push ebp
push ebx
push ebx
push ebx
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x407d0e
mov edi, dword [esi + 0x2c]
push 0x14
pop eax
cmp edi, eax
cmovb eax, edi
push eax
push ebp
push dword [esp + 0x44]
call fcn.0049fa90
mov esi, dword [esi + 0x30]
lea ecx, [edi + ebp]
push 0x10
pop eax
cmp esi, eax
mov dword [esp + 0x34], ecx
cmovb eax, esi
push eax
push ecx
push dword [esp + 0x4c]
call fcn.0049fa90
xor edi, edi
add esp, 0x18
inc edi
add esi, 0xfffffff0
je 0x407d0e
test esi, esi
je 0x407d0e
mov ecx, dword [esp + 0x28]
test edi, edi
je 0x407d0e
xor eax, eax
cmp byte [ecx + ebx + 0x10], al
cmove eax, edi
inc ebx
mov edi, eax
cmp ebx, esi
jb 0x407cfa
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebp, dword [esp + 0x1c]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov ecx, dword [esp + 0x2c]
call fcn.004035a7
test eax, eax
jne 0x407d51
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_dpapi_unprotect_credhist_entry_with_shaDerivedkey___kull_m_crypto_close_hprov_delete_container__0x_08x__n
jmp 0x407d4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_dpapi_unprotect_credhist_entry_with_shaDerivedkey___kull_m_crypto_hkey_session__0x_08x__n
call fcn.00409cda
pop ecx
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
Function at 0x407eb5
Capabilities:
Encode data using base64 via winapi
Write file on windows

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
xor esi, esi
mov eax, ecx
mov ebx, esi
mov dword [esp + 0x10], eax
mov ebp, edx
mov dword [esp + 0xc], esi
push edi
cmp dword [0x52859c], ebx
je 0x407f66
lea eax, [esp + 0x10]
push eax
push esi
push 1
push dword [esp + 0x28]
push ebp
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
test eax, eax
je 0x407fb0
mov eax, dword [esp + 0x10]
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x407fb0
lea eax, [esp + 0x10]
push eax
push edi
push 1
push dword [esp + 0x28]
push ebp
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
mov ebx, eax
test ebx, ebx
je 0x407f5d
push dword [esp + 0x14]
push str._n_nBase64_of_file_:__s_n_n
call fcn.00409cda
pop ecx
pop ecx
cmp dword [esp + 0x10], esi
jbe 0x407f52
movzx eax, word [edi + esi*2]
push eax
push 0x4dc880
call fcn.00409cda
inc esi
pop ecx
pop ecx
cmp esi, dword [esp + 0x10]
jb 0x407f3a
push str._n
call fcn.00409cda
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x407fb0
push esi
push esi
push 2
push esi
push esi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
test edi, edi
je 0x407fb0
cmp edi, 0xffffffff
je 0x407fb0
push esi
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x14]
push eax
push esi
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407fa9
cmp esi, dword [esp + 0x10]
jne 0x407fa9
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ebx, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
pop ecx
pop ecx
ret

Function at 0x407fb9
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0xc
push ebp
push esi
xor esi, esi
mov ebp, edx
cmp dword [0x5285a0], esi
je 0x407ff6
push dword [esp + 0x18]
call fcn.0040fd58
mov esi, eax
pop ecx
test esi, esi
jne 0x40807c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_file_readGeneric___kull_m_string_quick_base64_to_Binary__0x_08x__n
call fcn.00409cda
pop ecx
pop ecx
jmp 0x40807c
push edi
push esi
push dword [esp + 0x24]
push 3
push esi
push 3
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
test edi, edi
je 0x40807b
cmp edi, 0xffffffff
je 0x40807b
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x408074
cmp dword [esp + 0x14], esi
jne 0x408074
mov eax, dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x20]
push eax
push 0x40
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp], eax
test eax, eax
je 0x408073
push esi
lea ecx, [esp + 0x14]
push ecx
push dword [ebx]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40806a
mov eax, dword [ebx]
cmp eax, dword [esp + 0x10]
jne 0x40806a
xor esi, esi
inc esi
jmp 0x408073
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0xc
ret