Function at 0x1058953
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x10b5894]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x1c], ecx
xor ecx, ecx
inc dword [eax + 4]
mov dword [ebp - 0x2c], ecx
mov esi, ebx
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x2c]
movsd dword es:[edi], dword [esi]
push eax
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], ecx
movsd dword es:[edi], dword [esi]
call fcn.0107bd5e
mov esi, eax
xor edi, edi
cmp esi, edi
je 0x10589c2
push esi
push 0x1f340139
call fcn.0107ae44
jmp 0x1058de5
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
add ebx, 0x10
push 1
mov dword [ebp - 0x18], ebx
call fcn.010518cb
mov esi, eax
cmp esi, edi
je 0x10589f2
push esi
push 0x1f3c0139
jmp 0x10589b8
mov eax, dword [ebp - 0x20]
shr eax, 1
lea eax, [eax + eax + 2]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, edi
mov dword [ebp - 0x38], esi
jne 0x1058a1c
mov esi, 0x8007000e
push esi
push 0x1f440139
jmp 0x1058e4b
push dword [ebp - 0x20]
push dword [ebp - 0x18]
push esi
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x20]
shr eax, 1
add esp, 0xc
mov word [esi + eax*2], di
cmp dword [0x10b759c], edi
je 0x1058a69
push 0x10105b4
call fcn.0108880b
mov dword [esp], 0x8d4
call fcn.0107a681
push eax
call fcn.0108880b
push dword [ebp - 0x2c]
push esi
push 0x1010598
call fcn.0108880b
add esp, 0x10
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x18], eax
sub dword [ebp - 0x1c], eax
je 0x1058dd5
cmp dword [0x10b759c], edi
mov ebx, 0x1003d24
je 0x1058a8c
push ebx
call fcn.0108880b
pop ecx
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.010518cb
mov esi, eax
cmp esi, edi
jne 0x1058e25
cmp dword [0x10b759c], 1
jle 0x1058ac9
push ebx
call fcn.0108880b
pop ecx
push dword [ebp - 0x3c]
mov eax, 0x100c1f8
push eax
push eax
push 1
call fcn.0104c905
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 1
call fcn.010518cb
mov esi, eax
cmp esi, edi
jne 0x1058e2d
cmp dword [0x10b75b8], edi
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x30], eax
je 0x1058b18
push ebx
call fcn.0108880b
pop ecx
push 0xffffffffffffffff
push dword [ebp - 0x30]
push dword [ebp - 0x18]
call fcn.010524db
mov esi, eax
cmp esi, edi
jne 0x1058e35
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x18], eax
sub dword [ebp - 0x1c], eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.010518cb
mov esi, eax
cmp esi, edi
jne 0x1058e3d
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.010518cb
mov esi, eax
cmp esi, edi
jne 0x1058e45
cmp dword [0x10b759c], edi
je 0x1058b7f
lea eax, [ebp - 0x5c]
push eax
push edi
push 0x20f
call fcn.01036be2
cmp eax, edi
je 0x1058b7f
push eax
push 0x1f910139
call fcn.0107ae44
test dword [ebp - 0x3c], 8
jne 0x1058bb7
mov eax, dword [ebp - 0x34]
inc dword [eax + 8]
cmp dword [0x10b759c], edi
je 0x1058dcc
push 0x8a9
call fcn.0107a681
push eax
call fcn.0108880b
push ebx
call fcn.0108880b
pop ecx
pop ecx
jmp 0x1058dcc
mov edi, dword [ebp - 0x34]
inc dword [edi + 0xc]
inc dword [edi + 0x20]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 1
call fcn.010518cb
mov esi, eax
test esi, esi
jne 0x1058e52
cmp dword [0x10b759c], 1
jle 0x1058c00
push 0x101058c
call fcn.0108880b
pop ecx
push 8
push dword [ebp - 0x18]
push 0xe04
call fcn.0107dd80
cmp dword [ebp + 0x18], 0
je 0x1058c2a
push 0
push dword [ebp - 0x18]
push 1
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x1058c2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x1058e5a
add dword [ebp - 0x18], 8
sub dword [ebp - 0x1c], 8
lea eax, [ebp - 0x20]
push eax
push 8
push dword [ebp - 0x20]
call fcn.0104fe69
mov esi, eax
test esi, esi
jne 0x1058e62
cmp dword [0x10b759c], 1
jle 0x1058c7f
push ebx
call fcn.0108880b
mov dword [esp], 0x8d5
call fcn.0107a681
push eax
call fcn.0108880b
push ebx
call fcn.0108880b
pop ecx
pop ecx
push dword [ebp - 0x20]
push dword [ebp - 0x18]
push esi
call fcn.0107dd80
cmp dword [ebp + 0x18], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x48], eax
je 0x1058dc1
push eax
push 0
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
mov dword [ebp - 0x24], esi
je 0x1058e6a
push dword [ebp - 0x28]
push dword [ebp - 0x18]
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
push esi
push 0
push 1
push 0
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x1058ce5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1fe30139
call fcn.0107ae44
jmp 0x1058da6
cmp dword [0x10b759c], 1
jle 0x1058d1c
push ebx
call fcn.0108880b
mov dword [esp], 0x8d6
call fcn.0107a681
push eax
call fcn.0108880b
push ebx
call fcn.0108880b
pop ecx
pop ecx
push dword [ebp - 0x20]
push esi
push 0x1000
call fcn.01035fa8
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x50]
push eax
push 0xa400
push 0
push dword [ebp - 0x28]
push esi
call fcn.01051a7f
mov esi, eax
test esi, esi
jne 0x1058e77
mov esi, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x50]
push eax
push 1
push esi
push ebx
push dword [ebp - 0x30]
push dword [ebp - 0x40]
call fcn.01058610
test eax, eax
je 0x1058d63
push eax
push 0x20020139
call fcn.0107ae44
push edi
push 0
push esi
push ebx
push dword [ebp - 0x30]
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push dword [ebp - 0x54]
call fcn.010526cb
test eax, eax
je 0x1058d8d
push 0x80090006
push eax
push 0x200d0139
call fcn.0107ae61
test esi, esi
mov ecx, esi
mov eax, ebx
je 0x1058d9c
mov byte [eax], 0
inc eax
dec ecx
jne 0x1058d95
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
test ecx, ecx
mov eax, esi
je 0x1058db6
mov byte [eax], 0
inc eax
dec ecx
jne 0x1058daf
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
and dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x48]
add dword [ebp - 0x18], eax
sub dword [ebp - 0x1c], eax
xor edi, edi
cmp dword [ebp - 0x1c], edi
ja 0x1058a78
xor esi, esi
cmp dword [ebp - 0x38], edi
je 0x1058de5
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x2c], edi
je 0x1058df3
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x24], edi
je 0x1058e12
mov ecx, dword [ebp - 0x28]
cmp ecx, edi
mov eax, dword [ebp - 0x24]
je 0x1058e09
mov byte [eax], 0
inc eax
dec ecx
jne 0x1058e02
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.01068363
leave
ret 0x18
push esi
push 0x1f610139
jmp 0x1058e4b
push esi
push 0x1f6e0139
jmp 0x1058e4b
push esi
push 0x1f780139
jmp 0x1058e4b
push esi
push 0x1f850139
jmp 0x1058e4b
push esi
push 0x1f8c0139
call fcn.0107ae44
jmp 0x1058dd7
push esi
push 0x1fa60139
jmp 0x1058e7d
push esi
push 0x1fbe0139
jmp 0x1058e7d
push esi
push 0x1fc60139
jmp 0x1058e7d
mov esi, 0x8007000e
push esi
push 0x1fdd0139
jmp 0x1058e7d
push esi
push 0x1ff90139
call fcn.0107ae44
xor edi, edi
jmp 0x1058dd7