Function at 0x403617
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x430
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [edi + 0x310], ebx
mov esi, dword [eax + 4]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
push 5
lea eax, [ebp - 0xc]
push eax
push esi
mov dword [ebp - 0x24], ebx
mov byte [ebp - 0xc], 1
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], 0xd0
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4038a7
push 0x3f
lea eax, [ebp - 0xa3]
push ebx
push eax
mov byte [ebp - 0xa4], bl
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x22b]
push ebx
push eax
mov byte [ebp - 0x22c], bl
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [esi + 0x18]
push eax
push edi
call fcn.004032d4
test eax, eax
je 0x4038a0
push 0x7e
lea eax, [ebp - 0x122]
push ebx
push eax
mov word [ebp - 0x124], bx
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x1fe
lea eax, [ebp - 0x42a]
push ebx
push eax
mov word [ebp - 0x42c], bx
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x3f
lea eax, [ebp - 0x124]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0xa4]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
push 0xff
lea eax, [ebp - 0x42c]
push eax
push 0xffffffffffffffff
lea eax, [edi + 4]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x42c]
push eax
push edi
call fcn.004031d0
xor eax, eax
mov byte [ebp - 0x38], bl
lea edi, [ebp - 0x37]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x38]
push eax
push edi
call fcn.0040342c
test eax, eax
je 0x4038a7
mov ecx, dword [esi + 0x2c]
lea eax, [ecx + 0x60]
cmp eax, dword [ebp - 0x14]
jae 0x403894
lea eax, [ecx + esi]
lea edx, [eax + 0x5c]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], edx
mov edx, dword [eax + 0x6c]
xor eax, eax
lea edi, [ebp - 0x18]
mov dword [ebp - 0x1c], ebx
stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
cmp eax, ebx
mov dword [ebp - 0x10], edx
je 0x4037a0
mov edi, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], eax
lea eax, [edx + ecx + 0x6c]
mov ecx, dword [ebp - 0x14]
cmp eax, ecx
jae 0x403885
xor eax, eax
mov byte [ebp - 0x4c], bl
lea edi, [ebp - 0x4b]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x4c]
push eax
add ecx, 0xffffffd4
push ecx
lea eax, [esi + 0x14]
push eax
push dword [ebp - 0x1c]
lea eax, [ebp - 0x38]
push dword [ebp - 0x18]
mov ecx, edi
push dword [ebp - 0xc]
push eax
call fcn.00402fe6
push 0x14
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 0x14]
lea eax, [eax + esi - 0x14]
push eax
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x403879
push dword [ebp - 0x10]
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x40386b
push dword [ebp - 0x1c]
lea eax, [ebp + 8]
push dword [ebp - 0x18]
mov dword [ebp + 8], ebx
push eax
mov eax, dword [ebp - 0x20]
add eax, 0x3c
push eax
lea eax, [ebp - 0x38]
push eax
mov eax, edi
call fcn.0040304b
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x20]
add eax, 0x70
push eax
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push 1
push ebx
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
cmp eax, ebx
mov dword [ebp - 0x24], eax
je 0x403864
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10]
mov dword [eax + 4], esi
mov dword [eax], ecx
jmp 0x4038a7
push esi
call dword [sym.imp.KERNEL32.DLL_LocalFree]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [edi + 0x310], eax
jmp 0x4038a7
mov dword [edi + 0x310], 0xfffffffc
jmp 0x4038a7
mov eax, dword [ebp + 8]
mov dword [eax + 0x310], 0xfffffffd
jmp 0x4038a7
mov dword [edi + 0x310], 0xfffffffd
jmp 0x4038a7
or dword [edi + 0x310], 0xffffffff
mov eax, dword [ebp - 0x24]
pop edi
pop esi
pop ebx
leave
ret 0xc