Function at 0x401800
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43076e
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x441054]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x41], 0
push 0xf0000008
push 1
push 0
push 0
lea eax, [ebp - 0x58]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x401a4a
push str.0602000000A4000052534131000400000100010061CA8365394A08E919B785CF323449C3621135B0894C78CF0B5B70974959A7F3672742DFB3E45087AA09D1731447FD0982049BA6F4B7ACC7090208BF967C04254C64DE6B8F0F1031290A1175DE2CFA8B1C1FDB60D387B09061F421BC939C88413853297B2B28993569D0EA3FA8D8949112856A52569EBCA503F4A8756E5C29D3
lea ecx, [ebp - 0x28]
call fcn.00404cc0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x4d]
call fcn.00404530
push eax
lea ecx, [ebp - 0x28]
call fcn.0040c5d0
shr eax, 1
push eax
lea ecx, [ebp - 0x68]
call fcn.00405240
mov byte [ebp - 4], 1
mov dword [ebp - 0x48], 0
jmp 0x40189d
mov ecx, dword [ebp - 0x48]
add ecx, 1
mov dword [ebp - 0x48], ecx
lea ecx, [ebp - 0x68]
call fcn.0040c5f0
cmp dword [ebp - 0x48], eax
jae 0x4018ee
mov edx, dword [ebp - 0x48]
push edx
lea ecx, [ebp - 0x68]
call fcn.00406700
push eax
push str._02hhX
push 2
mov eax, dword [ebp - 0x48]
shl eax, 1
push eax
lea ecx, [ebp - 0x40]
push ecx
lea ecx, [ebp - 0x28]
call fcn.0040c770
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
call fcn.00409e90
push eax
call fcn.0040d5e0
add esp, 0xc
lea ecx, [ebp - 0x40]
call fcn.00405ec0
jmp 0x401894
lea edx, [ebp - 0x4c]
push edx
push 0
push 0
lea ecx, [ebp - 0x68]
call fcn.0040c5f0
push eax
lea ecx, [ebp - 0x68]
call fcn.004099c0
push eax
mov eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x4019f5
mov dword [ebp - 0x54], 0
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x54]
push edx
push 0
push 0
push 1
push 0
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x4019bd
mov ecx, dword [ebp - 0x54]
push ecx
mov ecx, dword [ebp + 0x10]
call fcn.0040c0a0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0x10]
call fcn.004099c0
push eax
call fcn.00410360
add esp, 0xc
mov ecx, dword [ebp - 0x54]
push ecx
lea edx, [ebp + 0xc]
push edx
mov ecx, dword [ebp + 0x10]
call fcn.004099c0
push eax
push 0
push 1
push 0
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x40198f
mov byte [ebp - 0x41], 1
jmp 0x4019bb
push 0x403e60
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptEncrypt__encryption_step__failed_with_error:
push 0x442160
call fcn.00402420
add esp, 8
mov ecx, eax
call fcn.00406420
mov ecx, eax
call fcn.004065b0
jmp 0x4019e9
push 0x403e60
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptEncrypt__buffer_size_step__failed_with_error:
push 0x442160
call fcn.00402420
add esp, 8
mov ecx, eax
call fcn.00406420
mov ecx, eax
call fcn.004065b0
mov ecx, dword [ebp - 0x4c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x401a21
push 0x403e60
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptImportKey_failed_with_error:
push 0x442160
call fcn.00402420
add esp, 8
mov ecx, eax
call fcn.00406420
mov ecx, eax
call fcn.004065b0
push 0
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x68]
call fcn.00405fb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00405ec0
jmp 0x401a76
push 0x403e60
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptAcquireContext_failed_with_error:
push 0x442160
call fcn.00402420
add esp, 8
mov ecx, eax
call fcn.00406420
mov ecx, eax
call fcn.004065b0
mov al, byte [ebp - 0x41]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e5aa
mov esp, ebp
pop ebp
ret