Function at 0x498478
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x17
push 0
push 0
dec ecx
jne 0x498481
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 0x498ae9
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 [0x46da70]
call fcn.00406234
add esp, 4
lea ecx, [ebp - 0x2a]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0xc]
call fcn.0049dc80
cmp word [ebp - 0x2a], 0
jne 0x4984fb
lea edx, [ebp - 0x7c]
mov eax, 0x4972c8
call fcn.00406ef4
mov ecx, dword [ebp - 0x7c]
mov dl, 1
mov eax, dword [0x46db5c]
call fcn.0046e15c
call fcn.00404274
movzx eax, word [ebp - 0x2a]
push eax
lea eax, [ebp - 0x30]
mov ecx, 1
mov edx, dword [0x46da70]
call fcn.00406234
add esp, 4
lea ecx, [ebp - 0x2a]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0xc]
call fcn.0049dc80
movzx eax, word [ebp - 0x2a]
push eax
lea eax, [ebp - 0x30]
mov ecx, 1
mov edx, dword [0x46da70]
call fcn.00406234
add esp, 4
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x5c]
push eax
call sub.ole32.dll_CoCreateGuid
push 0x498b00
mov eax, dword [ebp - 0x5c]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x80]
mov eax, 8
call fcn.00409574
push dword [ebp - 0x80]
push 0x498b0c
lea ecx, [ebp - 0x84]
movzx eax, word [ebp - 0x58]
mov edx, 4
call fcn.00409538
push dword [ebp - 0x84]
push 0x498b0c
lea ecx, [ebp - 0x88]
movzx eax, word [ebp - 0x56]
mov edx, 4
call fcn.00409538
push dword [ebp - 0x88]
push 0x498b0c
lea ecx, [ebp - 0x8c]
xor eax, eax
mov al, byte [ebp - 0x54]
mov edx, 2
call fcn.00409538
push dword [ebp - 0x8c]
lea ecx, [ebp - 0x90]
xor eax, eax
mov al, byte [ebp - 0x53]
mov edx, 2
call fcn.00409538
push dword [ebp - 0x90]
push 0x498b0c
lea eax, [ebp - 0x28]
mov edx, 0xa
call fcn.00404c4c
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.00409538
mov edx, dword [ebp - 0x94]
lea eax, [ebp - 0x28]
call fcn.00404b94
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 8
jne 0x4985fb
lea eax, [ebp - 0x28]
mov edx, 0x498b18
call fcn.00404b94
mov eax, dword [ebp - 0xc]
call fcn.0049e768
test eax, eax
jne 0x49864c
mov dword [ebp - 0x20], 1
jmp 0x498689
mov eax, dword [ebp - 0xc]
call fcn.0049e768
cmp eax, 4
jne 0x498662
mov dword [ebp - 0x20], 2
jmp 0x498689
lea edx, [ebp - 0x98]
mov eax, 0x4972c8
call fcn.00406ef4
mov ecx, dword [ebp - 0x98]
mov dl, 1
mov eax, dword [0x46db5c]
call fcn.0046e15c
call fcn.00404274
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.00498e60
mov eax, dword [ebp - 0xc]
call fcn.0049e768
mov ecx, eax
mov eax, dword [ebp - 4]
mov dl, byte [eax + 0x4a]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.004991b0
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
call fcn.00404b8c
test eax, eax
jle 0x4986df
lea eax, [ebp - 0x44]
mov edx, 0x498b24
call fcn.00404b94
lea eax, [ebp - 0x44]
call fcn.00404ddc
mov dword [ebp - 0x48], eax
jmp 0x4986e4
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 0x4986f9
mov dword [ebp - 0x4c], 0x20
jmp 0x4986fe
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.00404d84
push eax
lea eax, [ebp - 0x10]
push eax
call sub.advapi32.dll_CryptAcquireContextA
test eax, eax
jne 0x49878a
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x24], eax
lea edx, [ebp - 0xa0]
mov eax, 0x4972d0
call fcn.00406ef4
push dword [ebp - 0xa0]
push 0x498b30
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0xa4]
mov eax, 8
call fcn.00409574
push dword [ebp - 0xa4]
lea eax, [ebp - 0x9c]
mov edx, 3
call fcn.00404c4c
mov ecx, dword [ebp - 0x9c]
mov dl, 1
mov eax, dword [0x46db5c]
call fcn.0046e15c
call fcn.00404274
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.00406078
mov edx, eax
mov eax, dword [ebp - 0x30]
xor ecx, ecx
call fcn.00496bd0
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
mov ecx, 1
mov edx, dword [0x46da70]
call fcn.00406234
add esp, 4
lea eax, [ebp - 0x1c]
push eax
mov al, byte [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x30]
call fcn.00406078
mov edx, eax
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x30]
call fcn.00496bd0
test al, al
jne 0x49880d
lea edx, [ebp - 0xa8]
mov eax, 0x4972d8
call fcn.00406ef4
mov ecx, dword [ebp - 0xa8]
mov dl, 1
mov eax, dword [0x46db5c]
call fcn.0046e15c
call fcn.00404274
xor eax, eax
mov dword [ebp - 0x3c], eax
cmp byte [ebp + 0xc], 0
je 0x49881c
or dword [ebp - 0x3c], 1
cmp byte [ebp + 8], 0
je 0x498826
or dword [ebp - 0x3c], 2
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
mov ecx, 1
mov edx, dword [0x46da70]
call fcn.00406234
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.00406078
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 0x4988d6
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, 0x4972d0
call fcn.00406ef4
push dword [ebp - 0xb0]
push 0x498b30
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0xb4]
mov eax, 8
call fcn.00409574
push dword [ebp - 0xb4]
lea eax, [ebp - 0xac]
mov edx, 3
call fcn.00404c4c
mov ecx, dword [ebp - 0xac]
mov dl, 1
mov eax, dword [0x46db5c]
call fcn.0046e15c
call fcn.00404274
lea eax, [ebp - 0x78]
xor ecx, ecx
mov edx, 0x1c
call fcn.00403114
mov eax, dword [ebp - 0x28]
call fcn.00404b8c
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.00404b8c
push eax
mov eax, dword [ebp - 0x28]
call fcn.00404d84
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.00404f10
push 0
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x28]
call fcn.00404ddc
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.00404f10
mov eax, dword [ebp - 0x28]
call fcn.00404b8c
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.00404b8c
push eax
mov eax, dword [ebp - 0x28]
call fcn.00404d84
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 0x498a84
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, 0x4972d0
call fcn.00406ef4
push dword [ebp - 0xbc]
push 0x498b30
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0xc0]
mov eax, 8
call fcn.00409574
push dword [ebp - 0xc0]
lea eax, [ebp - 0xb8]
mov edx, 3
call fcn.00404c4c
mov ecx, dword [ebp - 0xb8]
mov dl, 1
mov eax, dword [0x46db5c]
call fcn.0046e15c
call fcn.00404274
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 0x498af0
lea eax, [ebp - 0xc0]
mov edx, 0x12
call fcn.004048f8
lea eax, [ebp - 0x44]
call fcn.004048d4
lea eax, [ebp - 0x34]
mov edx, dword [0x46da70]
mov ecx, 2
call fcn.00405540
lea eax, [ebp - 0x28]
call fcn.004048d4
ret