Function at 0x408812
Capabilities:
Create new key via cryptacquirecontext
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
cmp word [ebp + 0xc], 1
jne 0x408855
mov dword [ebp - 4], 0x8003
jmp 0x408927
cmp word [ebp + 0xc], 2
jne 0x40886c
mov dword [ebp - 4], 0x8001
jmp 0x408927
cmp word [ebp + 0xc], 3
jne 0x408883
mov dword [ebp - 4], 0x8002
jmp 0x408927
cmp word [ebp + 0xc], 4
jne 0x40889a
mov dword [ebp - 4], 0x8004
jmp 0x408927
cmp word [ebp + 0xc], 5
jne 0x4088b1
mov dword [ebp - 4], 0x800c
jmp 0x408927
cmp word [ebp + 0xc], 6
jne 0x4088c8
mov dword [ebp - 4], 0x800d
jmp 0x408927
cmp word [ebp + 0xc], 7
jne 0x4088df
mov dword [ebp - 4], 0x800e
jmp 0x408927
cmp word [ebp + 0xc], 0
jne 0x4088f6
mov dword [ebp - 4], 0x8003
jmp 0x408927
cmp word [ebp + 0xc], 7
jg 0x408910
cmp word [ebp + 0xc], 0
jl 0x408910
xor eax, eax
jmp 0x408915
mov eax, 1
test eax, eax
je 0x408927
mov eax, 0x4672f2
jmp 0x408b60
mov dword [ebp - 0x18], esp
push 0xf0000000
push 0x18
push 0x4672f2
push 0x4672f2
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x40895e
push 6
call fcn.0042ed6f
add esp, 4
push reloc.WSOCK32.dll_getpeername
push 0
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
jne 0x408973
mov eax, 0x467391
push eax
push 1
mov ebx, 0x194
call fcn.0042fb00
add esp, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], esp
push 0
push dword [ebp - 0x18]
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x4089a0
add eax, 8
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
nop
nop
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x4089c0
push 6
call fcn.0042ed6f
add esp, 4
mov dword [ebp - 0x18], esp
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x4089f3
push 6
call fcn.0042ed6f
add esp, 4
push reloc.WSOCK32.dll_getpeername
push 0
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
jne 0x408a08
mov eax, 0x467391
push eax
push 1
mov ebx, 0x194
call fcn.0042fb00
add esp, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], esp
push 0
push dword [ebp - 0x18]
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x408a35
add eax, 8
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
nop
nop
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x408a55
push 6
call fcn.0042ed6f
add esp, 4
mov dword [ebp - 0x18], esp
push 0
lea eax, [ebp - 0x10]
push eax
push 0
push 2
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x408a8a
push 6
call fcn.0042ed6f
add esp, 4
push 0x80000301
push 0
push dword [ebp - 0x10]
push 1
mov ebx, 0x1bc
call fcn.0042f6c0
add esp, 0x10
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x408abd
push ebx
call fcn.0042ed69
add esp, 4
pop eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], esp
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x408ad7
add eax, 8
push eax
push 2
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x408afc
push 6
call fcn.0042ed6f
add esp, 4
mov dword [ebp - 0x18], esp
push dword [ebp - 0xc]
call dword [0x5b8708]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x408b1e
push 6
call fcn.0042ed6f
add esp, 4
mov dword [ebp - 0x18], esp
push 0
push dword [ebp - 8]
call dword [0x5b870c]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x408b45
push 6
call fcn.0042ed6f
add esp, 4
push 1
push 1
lea eax, [ebp - 0x14]
push eax
call fcn.00408b78
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
jmp 0x408b60
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x408b71
push ebx
call fcn.0042ed69
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0xc