Function at 0x498344
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x17
push 0
push 0
dec ecx
jne 0x49834d
push ecx
xchg dword [ebp - 4], ecx
push ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4989b5
push dword fs:[eax]
mov dword fs:[eax], esp
mov word [ebp - 0x2a], 0
movzx eax, word [ebp - 0x2a]
push eax
lea eax, [ebp - 0x30]
mov ecx, 1
mov edx, dword [0x46d93c]
call fcn.00406100
add esp, 4
lea ecx, [ebp - 0x2a]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0xc]
call fcn.0049db4c
cmp word [ebp - 0x2a], 0
jne 0x4983c7
lea edx, [ebp - 0x7c]
mov eax, 0x497194
call fcn.00406dc0
mov ecx, dword [ebp - 0x7c]
mov dl, 1
mov eax, dword [0x46da28]
call fcn.0046e028
call fcn.00404170
movzx eax, word [ebp - 0x2a]
push eax
lea eax, [ebp - 0x30]
mov ecx, 1
mov edx, dword [0x46d93c]
call fcn.00406100
add esp, 4
lea ecx, [ebp - 0x2a]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0xc]
call fcn.0049db4c
movzx eax, word [ebp - 0x2a]
push eax
lea eax, [ebp - 0x30]
mov ecx, 1
mov edx, dword [0x46d93c]
call fcn.00406100
add esp, 4
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x5c]
push eax
call sub.ole32.dll_CoCreateGuid
push 0x4989cc
mov eax, dword [ebp - 0x5c]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x80]
mov eax, 8
call fcn.00409440
push dword [ebp - 0x80]
push 0x4989d8
lea ecx, [ebp - 0x84]
movzx eax, word [ebp - 0x58]
mov edx, 4
call fcn.00409404
push dword [ebp - 0x84]
push 0x4989d8
lea ecx, [ebp - 0x88]
movzx eax, word [ebp - 0x56]
mov edx, 4
call fcn.00409404
push dword [ebp - 0x88]
push 0x4989d8
lea ecx, [ebp - 0x8c]
xor eax, eax
mov al, byte [ebp - 0x54]
mov edx, 2
call fcn.00409404
push dword [ebp - 0x8c]
lea ecx, [ebp - 0x90]
xor eax, eax
mov al, byte [ebp - 0x53]
mov edx, 2
call fcn.00409404
push dword [ebp - 0x90]
push 0x4989d8
lea eax, [ebp - 0x28]
mov edx, 0xa
call fcn.00404b48
mov dword [ebp - 0x18], 2
lea ecx, [ebp - 0x94]
mov eax, dword [ebp - 0x18]
movzx eax, byte [ebp + eax - 0x54]
mov edx, 2
call fcn.00409404
mov edx, dword [ebp - 0x94]
lea eax, [ebp - 0x28]
call fcn.00404a90
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 8
jne 0x4984c7
lea eax, [ebp - 0x28]
mov edx, 0x4989e4
call fcn.00404a90
mov eax, dword [ebp - 0xc]
call fcn.0049e634
test eax, eax
jne 0x498518
mov dword [ebp - 0x20], 1
jmp 0x498555
mov eax, dword [ebp - 0xc]
call fcn.0049e634
cmp eax, 4
jne 0x49852e
mov dword [ebp - 0x20], 2
jmp 0x498555
lea edx, [ebp - 0x98]
mov eax, 0x497194
call fcn.00406dc0
mov ecx, dword [ebp - 0x98]
mov dl, 1
mov eax, dword [0x46da28]
call fcn.0046e028
call fcn.00404170
lea ecx, [ebp - 0x44]
mov eax, dword [ebp - 4]
mov dl, byte [eax + 0x4a]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00498d2c
mov eax, dword [ebp - 0xc]
call fcn.0049e634
mov ecx, eax
mov eax, dword [ebp - 4]
mov dl, byte [eax + 0x4a]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.0049907c
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
call fcn.00404a88
test eax, eax
jle 0x4985ab
lea eax, [ebp - 0x44]
mov edx, 0x4989f0
call fcn.00404a90
lea eax, [ebp - 0x44]
call fcn.00404cd8
mov dword [ebp - 0x48], eax
jmp 0x4985b0
xor eax, eax
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x49]
add al, 0xfd
sub al, 5
jae 0x4985c5
mov dword [ebp - 0x4c], 0x20
jmp 0x4985ca
xor eax, eax
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
or eax, 8
push eax
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x28]
call fcn.00404c80
push eax
lea eax, [ebp - 0x10]
push eax
call sub.advapi32.dll_CryptAcquireContextA
test eax, eax
jne 0x498656
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x24], eax
lea edx, [ebp - 0xa0]
mov eax, 0x49719c
call fcn.00406dc0
push dword [ebp - 0xa0]
push 0x4989fc
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0xa4]
mov eax, 8
call fcn.00409440
push dword [ebp - 0xa4]
lea eax, [ebp - 0x9c]
mov edx, 3
call fcn.00404b48
mov ecx, dword [ebp - 0x9c]
mov dl, 1
mov eax, dword [0x46da28]
call fcn.0046e028
call fcn.00404170
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
mov al, byte [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x30]
call fcn.00405f44
mov edx, eax
mov eax, dword [ebp - 0x30]
xor ecx, ecx
call fcn.00496a9c
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
mov ecx, 1
mov edx, dword [0x46d93c]
call fcn.00406100
add esp, 4
lea eax, [ebp - 0x1c]
push eax
mov al, byte [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x30]
call fcn.00405f44
mov edx, eax
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x30]
call fcn.00496a9c
test al, al
jne 0x4986d9
lea edx, [ebp - 0xa8]
mov eax, 0x4971a4
call fcn.00406dc0
mov ecx, dword [ebp - 0xa8]
mov dl, 1
mov eax, dword [0x46da28]
call fcn.0046e028
call fcn.00404170
xor eax, eax
mov dword [ebp - 0x3c], eax
cmp byte [ebp + 0xc], 0
je 0x4986e8
or dword [ebp - 0x3c], 1
cmp byte [ebp + 8], 0
je 0x4986f2
or dword [ebp - 0x3c], 2
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
mov ecx, 1
mov edx, dword [0x46d93c]
call fcn.00406100
add esp, 4
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x3c]
push eax
push 0
mov eax, dword [ebp - 0x34]
call fcn.00405f44
push eax
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CryptImportKey
test eax, eax
jne 0x4987a2
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x24], eax
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CryptReleaseContext
lea edx, [ebp - 0xb0]
mov eax, 0x49719c
call fcn.00406dc0
push dword [ebp - 0xb0]
push 0x4989fc
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0xb4]
mov eax, 8
call fcn.00409440
push dword [ebp - 0xb4]
lea eax, [ebp - 0xac]
mov edx, 3
call fcn.00404b48
mov ecx, dword [ebp - 0xac]
mov dl, 1
mov eax, dword [0x46da28]
call fcn.0046e028
call fcn.00404170
lea eax, [ebp - 0x78]
xor ecx, ecx
mov edx, 0x1c
call fcn.00403114
mov eax, dword [ebp - 0x28]
call fcn.00404a88
add eax, eax
add eax, 4
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
call fcn.0040284c
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x78]
xor ecx, ecx
mov edx, dword [ebp - 0x18]
call fcn.00403114
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x78]
push eax
mov eax, dword [ebp - 0x28]
call fcn.00404a88
push eax
mov eax, dword [ebp - 0x28]
call fcn.00404c80
push eax
push 0
push 0
call sub.kernel32.dll_MultiByteToWideChar_1
xor eax, eax
mov dword [ebp - 0x40], eax
push 0
lea eax, [ebp - 0x40]
push eax
push 0
push 4
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CryptGetProvParam
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x40]
call fcn.00404e0c
push 0
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x28]
call fcn.00404cd8
push eax
push 4
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CryptGetProvParam
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x40]
call fcn.00404e0c
mov eax, dword [ebp - 0x28]
call fcn.00404a88
add eax, eax
add eax, 4
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
call fcn.0040284c
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x74]
xor ecx, ecx
mov edx, dword [ebp - 0x18]
call fcn.00403114
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x28]
call fcn.00404a88
push eax
mov eax, dword [ebp - 0x28]
call fcn.00404c80
push eax
push 0
push 0
call sub.kernel32.dll_MultiByteToWideChar_1
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x6c], eax
xor eax, eax
mov dword [ebp - 0x68], eax
xor eax, eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], 1
lea eax, [ebp - 0x78]
push eax
push 0
push 2
mov eax, dword [ebp - 8]
push eax
call sub.crypt32.dll_CertSetCertificateContextProperty
test eax, eax
jne 0x498950
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x74]
call fcn.0040286c
mov eax, dword [ebp - 0x78]
call fcn.0040286c
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_CryptDestroyKey
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CryptReleaseContext
lea edx, [ebp - 0xbc]
mov eax, 0x49719c
call fcn.00406dc0
push dword [ebp - 0xbc]
push 0x4989fc
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0xc0]
mov eax, 8
call fcn.00409440
push dword [ebp - 0xc0]
lea eax, [ebp - 0xb8]
mov edx, 3
call fcn.00404b48
mov ecx, dword [ebp - 0xb8]
mov dl, 1
mov eax, dword [0x46da28]
call fcn.0046e028
call fcn.00404170
mov eax, dword [ebp - 0x74]
call fcn.0040286c
mov eax, dword [ebp - 0x78]
call fcn.0040286c
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_CryptDestroyKey
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CryptReleaseContext
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4989bc
lea eax, [ebp - 0xc0]
mov edx, 0x12
call fcn.004047f4
lea eax, [ebp - 0x44]
call fcn.004047d0
lea eax, [ebp - 0x34]
mov edx, dword [0x46d93c]
mov ecx, 2
call fcn.0040540c
lea eax, [ebp - 0x28]
call fcn.004047d0
ret