Function at 0x4021c0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4337d0
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x445054]
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 0x40240a
push str.0602000000A4000052534131000400000100010061CA8365394A08E919B785CF323449C3621135B0894C78CF0B5B70974959A7F3672742DFB3E45087AA09D1731447FD0982049BA6F4B7ACC7090208BF967C04254C64DE6B8F0F1031290A1175DE2CFA8B1C1FDB60D387B09061F421BC939C88413853297B2B28993569D0EA3FA8D8949112856A52569EBCA503F4A8756E5C29D3
lea ecx, [ebp - 0x28]
call fcn.00406300
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x4d]
call fcn.00405b70
push eax
lea ecx, [ebp - 0x28]
call fcn.0040f230
shr eax, 1
push eax
lea ecx, [ebp - 0x68]
call fcn.00406b80
mov byte [ebp - 4], 1
mov dword [ebp - 0x48], 0
jmp 0x40225d
mov ecx, dword [ebp - 0x48]
add ecx, 1
mov dword [ebp - 0x48], ecx
lea ecx, [ebp - 0x68]
call fcn.0040f250
cmp dword [ebp - 0x48], eax
jae 0x4022ae
mov edx, dword [ebp - 0x48]
push edx
lea ecx, [ebp - 0x68]
call fcn.00408770
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.0040f3d0
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
call fcn.0040c910
push eax
call fcn.00410240
add esp, 0xc
lea ecx, [ebp - 0x40]
call fcn.00407c30
jmp 0x402254
lea edx, [ebp - 0x4c]
push edx
push 0
push 0
lea ecx, [ebp - 0x68]
call fcn.0040f250
push eax
lea ecx, [ebp - 0x68]
call fcn.0040c270
push eax
mov eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x4023b5
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 0x40237d
mov ecx, dword [ebp - 0x54]
push ecx
mov ecx, dword [ebp + 0x10]
call fcn.0040ed00
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0x10]
call fcn.0040c270
push eax
call fcn.00413080
add esp, 0xc
mov ecx, dword [ebp - 0x54]
push ecx
lea edx, [ebp + 0xc]
push edx
mov ecx, dword [ebp + 0x10]
call fcn.0040c270
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 0x40234f
mov byte [ebp - 0x41], 1
jmp 0x40237b
push 0x4054a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptEncrypt__encryption_step__failed_with_error:
push 0x446200
call fcn.00403370
add esp, 8
mov ecx, eax
call fcn.00408470
mov ecx, eax
call fcn.00408600
jmp 0x4023a9
push 0x4054a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptEncrypt__buffer_size_step__failed_with_error:
push 0x446200
call fcn.00403370
add esp, 8
mov ecx, eax
call fcn.00408470
mov ecx, eax
call fcn.00408600
mov ecx, dword [ebp - 0x4c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x4023e1
push 0x4054a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptImportKey_failed_with_error:
push 0x446200
call fcn.00403370
add esp, 8
mov ecx, eax
call fcn.00408470
mov ecx, eax
call fcn.00408600
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.00407d40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00407c30
jmp 0x402436
push 0x4054a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4352fc
push 0x446200
call fcn.00403370
add esp, 8
mov ecx, eax
call fcn.00408470
mov ecx, eax
call fcn.00408600
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.004112c7
mov esp, ebp
pop ebp
ret