Function at 0x10001140
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
push esi
push edi
xor edi, edi
cmp ebx, edi
jle 0x10001435
cmp ebx, 0x10
jg 0x10001435
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov cx, word [eax]
cmp cx, 0x5a4d
mov dword [esp + 0x2c], ecx
jne 0x1000123a
mov ecx, dword [eax + 0x3c]
lea ecx, [ecx + eax + 0x78]
mov ecx, dword [ecx]
cmp ecx, edi
je 0x1000123a
mov edx, dword [ecx + eax + 0x1c]
mov esi, dword [ecx + eax + 0x18]
mov dword [esp + 0x1c], edx
mov edx, dword [ecx + eax + 0x20]
mov ecx, dword [ecx + eax + 0x24]
cmp esi, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x18], edi
jbe 0x1000123a
add edx, eax
lea ebx, [ecx + eax]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x1c]
xor ecx, ecx
mov cx, word [ebx]
lea edi, [edx + ecx*4]
mov ecx, dword [esp + 0x10]
mov dl, byte [str.CryptAcquireContextW]
add edi, eax
mov esi, dword [ecx]
xor ecx, ecx
add esi, eax
test dl, dl
je 0x10001201
mov ebp, esi
sub ebp, str.CryptAcquireContextW
mov dl, byte [ecx + ebp + str.CryptAcquireContextW]
test dl, dl
je 0x10001201
cmp byte [ecx + str.CryptAcquireContextW], dl
jne 0x10001201
mov dl, byte [ecx + 0x10003205]
inc ecx
test dl, dl
jne 0x100011e3
mov dl, byte [ecx + str.CryptAcquireContextW]
test dl, dl
jne 0x10001215
cmp byte [ecx + esi], 0
je 0x1000130a
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
inc ecx
add ebx, 2
add esi, 4
cmp ecx, edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], esi
jb 0x100011b9
mov ebx, dword [esp + 0x38]
xor edi, edi
mov dword [esp + 0x10], edi
cmp word [esp + 0x2c], 0x5a4d
jne 0x10001329
mov edx, dword [eax + 0x3c]
lea ecx, [edx + eax + 0x78]
mov ecx, dword [edx + eax + 0x78]
cmp ecx, edi
je 0x10001329
mov edx, dword [ecx + eax + 0x1c]
mov esi, dword [ecx + eax + 0x18]
mov dword [esp + 0x2c], edx
mov edx, dword [ecx + eax + 0x20]
mov ecx, dword [ecx + eax + 0x24]
cmp esi, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x1c], edi
jbe 0x10001329
add edx, eax
lea ebx, [ecx + eax]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x2c]
xor ecx, ecx
mov cx, word [ebx]
lea edi, [edx + ecx*4]
mov ecx, dword [esp + 0x18]
mov dl, byte [str.CryptImportKey]
add edi, eax
mov esi, dword [ecx]
xor ecx, ecx
add esi, eax
test dl, dl
je 0x100012d3
mov ebp, esi
sub ebp, str.CryptImportKey
mov dl, byte [ecx + ebp + str.CryptImportKey]
test dl, dl
je 0x100012d3
cmp byte [ecx + str.CryptImportKey], dl
jne 0x100012d3
mov dl, byte [ecx + 0x100031f5]
inc ecx
test dl, dl
jne 0x100012b5
mov dl, byte [ecx + str.CryptImportKey]
test dl, dl
jne 0x100012e3
cmp byte [ecx + esi], 0
je 0x1000131d
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
inc ecx
add ebx, 2
add esi, 4
cmp ecx, edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], esi
jb 0x1000128b
mov ebx, dword [esp + 0x38]
xor edi, edi
jmp 0x10001329
mov edi, dword [edi]
mov ebx, dword [esp + 0x38]
add edi, eax
mov dword [esp + 0x10], edi
xor edi, edi
jmp 0x1000123e
mov esi, dword [edi]
mov ebx, dword [esp + 0x38]
add esi, eax
xor edi, edi
jmp 0x1000132b
xor esi, esi
push str.CryptEncrypt
push eax
call fcn.10001440
add esp, 8
lea edx, [esp + 0x14]
mov ebp, eax
mov dword [esp + 0x14], edi
push edi
push 1
push edi
push edi
push edx
call dword [esp + 0x24]
test eax, eax
jne 0x1000137e
push 8
push 1
push edi
lea eax, [esp + 0x20]
push edi
push eax
call dword [esp + 0x24]
test eax, eax
jne 0x1000137e
push 0xf0000000
push 1
push edi
lea ecx, [esp + 0x20]
push edi
push ecx
call dword [esp + 0x24]
test eax, eax
je 0x10001435
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
push edi
push edi
push 0x134
push 0x10003034
push eax
mov dword [esp + 0x38], edi
call esi
test eax, eax
je 0x10001435
xor eax, eax
cmp ebx, edi
jle 0x100013be
mov ecx, dword [esp + 0x34]
lea ecx, [ecx + ebx - 1]
mov dl, byte [ecx]
mov byte [eax + 0x10003174], dl
inc eax
dec ecx
cmp eax, ebx
jl 0x100013b0
lea eax, [ebx + 1]
mov byte [ebx + 0x10003174], 0
cmp eax, 0x3e
jge 0x100013ef
mov ecx, 0x3e
lea edi, [eax + 0x10003174]
sub ecx, eax
mov eax, 0x1010101
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x24]
mov dword [esp + 0x24], edi
push eax
push edi
push ecx
push 0x4c
push 0x10003168
push edx
call esi
test eax, eax
je 0x10001435
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
mov ecx, dword [eax]
push ecx
push eax
mov eax, dword [esp + 0x2c]
push edx
push edi
push 1
push edi
push eax
call ebp
pop edi
pop esi
test eax, eax
pop ebp
pop ebx
setne al
add esp, 0x20
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x20
ret