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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 0xd
xor eax, eax
pop ecx
lea edi, [ebp - 0x48]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
xor esi, esi
xor ebx, ebx
cmp ecx, 0x20
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
jae 0x76648209
push 0x80070057
jmp 0x7664858e
cmp ecx, 0x44
jb 0x76648266
mov edi, dword [eax + 0x24]
mov ecx, dword [eax + 0x28]
xor edx, edx
cmp edi, esi
mov dword [ebp - 0xc], edx
jbe 0x76648228
add edx, dword [ecx]
add ecx, 8
dec edi
jne 0x7664821d
mov dword [ebp - 0xc], edx
mov edi, dword [eax + 0x34]
cmp edi, esi
mov ecx, dword [eax + 0x38]
jbe 0x7664823d
add edx, dword [ecx]
add ecx, 8
dec edi
jne 0x76648232
mov dword [ebp - 0xc], edx
mov ecx, dword [eax + 0x2c]
cmp ecx, esi
mov edi, dword [eax + 0x30]
jbe 0x76648251
mov ebx, ecx
add esi, dword [edi]
add edi, 8
dec ebx
jne 0x76648249
mov edi, dword [eax + 0x34]
add ecx, edi
add ecx, dword [eax + 0x24]
mov eax, dword [eax + 0x3c]
lea esi, [esi + ecx*8]
add esi, edx
mov dword [ebp - 8], eax
jmp 0x76648269
mov dword [ebp - 8], esi
lea eax, [esi + 0xcc]
push eax
call fcn.765fc04a
mov ebx, eax
test ebx, ebx
je 0x766485c0
push 0x114
call fcn.765fc04a
mov edi, eax
test edi, edi
mov dword [ebp - 4], edi
je 0x766485c0
mov eax, dword [ebp + 8]
mov dword [edi + 0x2c], eax
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x34], eax
xor eax, eax
inc eax
cmp dword [ebp + 0x14], 0
mov dword [edi + 0x30], 3
mov dword [edi + 0x38], ebx
mov dword [edi + 0x3c], eax
mov dword [edi + 0x40], eax
je 0x766482d8
push dword [ebp + 0x14]
call fcn.76641cba
inc eax
push eax
push dword [ebp + 0x14]
call fcn.765ff93c
test eax, eax
mov dword [edi + 0x44], eax
je 0x766485c0
cmp dword [ebp + 0x18], 0
je 0x766482f3
push 0xc
push dword [ebp + 0x18]
call fcn.765ff93c
test eax, eax
mov dword [edi + 0x78], eax
je 0x766485c0
test esi, esi
ja 0x76648303
cmp dword [ebp - 8], 0
ja 0x76648303
and dword [ebx + 4], 0
jmp 0x7664830a
mov dword [ebx + 4], 2
test esi, esi
jbe 0x7664847e
mov eax, dword [ebp + 0x10]
or byte [ebx], 0x80
cmp dword [eax + 0x24], 0
jne 0x76648328
cmp dword [eax + 0x34], 0
je 0x766483e7
or byte [ebx + 8], 0x80
mov ecx, dword [eax + 0x34]
add ecx, dword [eax + 0x24]
mov dword [ebx + 0xc], ecx
lea ecx, [ebx + 0xcc]
mov dword [ebx + 0x10], ecx
mov esi, dword [eax + 0x24]
mov edx, dword [eax + 0x2c]
add edx, esi
add edx, dword [eax + 0x34]
test esi, esi
mov eax, dword [eax + 0x28]
lea edx, [ebx + edx*8 + 0xcc]
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], ecx
jbe 0x76648396
mov dword [ebp - 0x10], esi
mov ecx, dword [eax]
mov esi, dword [ebp + 8]
mov dword [esi], ecx
mov ecx, dword [eax]
mov esi, dword [eax + 4]
mov eax, ecx
shr ecx, 2
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 8]
add dword [ebp + 8], 8
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [eax + 4], edx
mov eax, dword [ebp + 0xc]
add edx, dword [eax]
add eax, 8
dec dword [ebp - 0x10]
mov dword [ebp + 0xc], eax
jne 0x76648360
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x34]
test ecx, ecx
mov eax, dword [eax + 0x38]
mov dword [ebp + 0xc], eax
jbe 0x766483e7
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax]
mov esi, dword [ebp + 8]
mov dword [esi], ecx
mov ecx, dword [eax]
mov esi, dword [eax + 4]
mov eax, ecx
shr ecx, 2
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0xc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [eax], 0
je 0x766483d0
mov byte [edx], 0xa1
mov ecx, dword [ebp + 8]
add dword [ebp + 8], 8
mov dword [ecx + 4], edx
add edx, dword [eax]
add eax, 8
dec dword [ebp - 0x10]
mov dword [ebp + 0xc], eax
jne 0x766483a9
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x2c], 0
je 0x7664847e
or byte [ebx + 8], 0x40
mov ecx, dword [eax + 0x2c]
mov dword [ebx + 0x14], ecx
mov ecx, dword [eax + 0x24]
test ecx, ecx
jne 0x76648412
cmp dword [eax + 0x34], ecx
jne 0x76648412
lea ecx, [ebx + 0xcc]
jmp 0x7664841d
mov edx, dword [eax + 0x34]
add edx, ecx
mov ecx, dword [ebx + 0x10]
lea ecx, [ecx + edx*8]
mov esi, dword [ebp - 0xc]
mov dword [ebx + 0x18], ecx
mov edx, dword [eax + 0x2c]
mov ecx, dword [eax + 0x24]
add ecx, edx
add ecx, dword [eax + 0x34]
test edx, edx
mov eax, dword [eax + 0x30]
lea ecx, [esi + ecx*8]
lea edi, [ecx + ebx + 0xcc]
mov ecx, dword [ebx + 0x18]
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], ecx
jbe 0x7664847e
mov dword [ebp - 0x10], edx
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [eax]
mov esi, dword [eax + 4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], edi
add edi, dword [eax]
add ecx, 8
add eax, 8
dec dword [ebp - 0x10]
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], ecx
jne 0x7664844b
cmp dword [ebp - 8], 0
jbe 0x766484d7
mov eax, dword [ebp - 8]
imul eax, eax, 0x4c
push eax
call fcn.765fc04a
mov esi, eax
test esi, esi
je 0x766485c0
mov eax, dword [ebp - 8]
or byte [ebx], 0x40
test eax, eax
mov ecx, dword [ebp + 0x10]
mov dword [ebx + 0xc8], esi
mov dword [ebx + 0xc4], eax
mov edi, dword [ecx + 0x40]
mov dword [ebp + 8], eax
jbe 0x766484d7
push esi
push edi
call fcn.765fd8ae
test eax, eax
je 0x766485c0
dec dword [ebp + 8]
add edi, 0xc
add esi, 0x4c
cmp dword [ebp + 8], 0
ja 0x766484b9
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 0x10]
call fcn.766463a7
test eax, eax
je 0x766485c0
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 4]
mov dword [eax + 0x20], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x60], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x7664850a
cmp dword [eax], 0xffffffff
je 0x7664850a
or dword [ebp - 0x20], 1
lea eax, [ebx + 4]
push eax
lea eax, [ebx + 0x1c]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.76646774
test eax, eax
je 0x766485c0
cmp dword [ebx + 4], 0
jle 0x76648544
push dword [ebp + 0x14]
call fcn.76641d13
test eax, eax
mov esi, dword [ebp - 4]
je 0x7664853e
and dword [esi + 0x34], 0xffffffbf
jmp 0x76648560
or dword [esi + 0x34], 0x40
jmp 0x76648560
mov esi, dword [ebp - 4]
test byte [esi + 0x34], 0x40
je 0x76648560
push dword [ebp + 0x14]
call fcn.76641d13
test eax, eax
jne 0x76648538
mov dword [ebx + 4], 2
mov ecx, dword [ebp + 0x14]
test ecx, ecx
lea eax, [ebx + 0x28]
mov word [ebx + 0x24], 0x80
mov word [eax], 0x10
jne 0x7664857a
mov ecx, 0x765f1970
lea edx, [ebx + 0x2c]
push edx
push eax
push ecx
call fcn.765fc8a7
test eax, eax
jne 0x76648596
push 0x80091003
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x766485c0
lea eax, [ebx + 0x6c]
push eax
push esi
lea eax, [ebp - 0x40]
call fcn.765fc823
test eax, eax
je 0x766485c0
cmp dword [ebp + 0x18], 0
je 0x7664863f
push dword [ebp + 0x10]
push dword [ebp - 4]
call fcn.7664d8a7
test eax, eax
jne 0x7664863f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
mov dword [ebp - 0x14], eax
je 0x7664860d
lea eax, [ebx + 0x1c]
push eax
call fcn.76643aa4
mov eax, dword [ebx + 0xc8]
test eax, eax
je 0x76648607
mov ecx, dword [ebx + 0xc4]
test ecx, ecx
jbe 0x766485fc
lea esi, [eax + 0x48]
mov edi, ecx
push dword [esi]
call fcn.765e40a0
add esi, 0x4c
dec edi
jne 0x766485ef
push dword [ebx + 0xc8]
call fcn.765e40a0
push ebx
call fcn.765e40a0
mov esi, dword [ebp - 4]
test esi, esi
je 0x76648680
mov ecx, dword [esi + 0x110]
test ecx, ecx
je 0x76648625
push 1
call fcn.765fa5cf
push dword [esi + 0x44]
call fcn.765e40a0
push dword [esi + 0x78]
call fcn.765e40a0
push esi
call fcn.765e40a0
xor esi, esi
jmp 0x76648680
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 0x10]
cmp eax, dword [ecx + 4]
mov esi, dword [ebp - 4]
mov edi, 0xffff7fff
mov ebx, 0x8000
je 0x7664866e
mov eax, dword [esi + 0x34]
test ebx, eax
je 0x7664866e
and eax, edi
push 0
mov dword [esi + 0x34], eax
push dword [ecx + 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test dword [ebp - 0x18], ebx
je 0x76648679
or dword [esi + 0x34], ebx
and dword [ebp - 0x18], edi
and dword [ebp - 0x1c], 0
mov esi, dword [ebp - 4]
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 0x10]
call fcn.766435b9
push dword [ebp - 0x14]
call fcn.765ffbbd
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x14