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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x765fb122
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x765fb122
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [esi + 0x78]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x30]
dec eax
je 0x765fb12a
dec eax
jne 0x7660e870
mov edi, dword [esi + 0x38]
test edi, edi
jne 0x765fb00a
cmp dword [esi + 0x48], edi
je 0x765fb083
cmp dword [esi + 0x3c], 0
jne 0x7660e9b6
mov eax, dword [esi + 0x48]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x765fb025
push 1
call fcn.765fa5cf
mov eax, dword [esi + 0x48]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x765fb036
push 1
call fcn.765fa5cf
mov eax, dword [esi + 0x48]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x765fb047
push 1
call fcn.765fa5cf
mov eax, dword [esi + 0x48]
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x765fb058
push 1
call fcn.765fb41d
mov eax, dword [esi + 0x48]
push dword [eax + 8]
call fcn.765e40a0
push dword [esi + 0x48]
call fcn.765e40a0
mov ecx, dword [esi + 0x50]
test ecx, ecx
je 0x765fb079
push 1
call fcn.765fb391
cmp dword [esi + 0x5c], 0
jne 0x7660ea2d
mov ecx, dword [esi + 0x110]
test ecx, ecx
jne 0x7660ea8d
mov ecx, dword [esi + 0x104]
test ecx, ecx
jne 0x7660ea99
push dword [esi + 0x78]
call fcn.765e40a0
push dword [esi + 0xac]
call fcn.765e40a0
push dword [esi + 0xbc]
call fcn.765e40a0
push dword [esi + 0xcc]
call fcn.765e40a0
push dword [esi + 0x8c]
call fcn.765e40a0
push dword [esi + 0x9c]
call fcn.765e40a0
lea edi, [esi + 0xf8]
xor ebx, ebx
cmp dword [edi], ebx
jne 0x7660eaa5
test byte [esi + 0x35], 0x80
jne 0x7660eac9
mov eax, dword [esi + 0x54]
cmp eax, ebx
jne 0x7660eaea
jmp 0x765fb13a
cmp dword [esi + 0x18], ebx
pop edi
pop ebx
je 0x765fb113
push esi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push esi
call fcn.765e40a0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
inc eax
pop esi
leave
ret 4
mov edi, dword [esi + 0x38]
test edi, edi
jne 0x7660ea60
jmp 0x765fb083
mov eax, dword [esi + 0x64]
cmp eax, ebx
jne 0x7660eaf7
jmp 0x765fb105
dec eax
je 0x7660e90c
dec eax
je 0x7660e884
dec eax
je 0x7660e894
dec eax
jne 0x765fb083
push 0x80091004
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x765fb083
mov edi, dword [esi + 0x38]
xor ebx, ebx
cmp dword [esi + 0x3c], ebx
je 0x7660e8df
push esi
call fcn.76641c96
test eax, eax
je 0x7660e8cd
cmp dword [edi + 0x9c], ebx
je 0x7660e8cd
add edi, 0xa0
cmp dword [edi], ebx
je 0x7660e8cd
push dword [0x76666084]
call sym.CRYPT32.dll_I_CryptGetAsn1Encoder
push dword [edi]
push eax
call fcn.765fe821
push dword [esi + 0x38]
call fcn.765e40a0
push dword [esi + 0x44]
call fcn.765e40a0
jmp 0x7660e8f5
push dword [0x76666084]
call sym.CRYPT32.dll_I_CryptGetAsn1Decoder
push dword [esi + 0x38]
push 0x20
push eax
call fcn.765f2a64
mov ecx, dword [esi + 0x50]
cmp ecx, ebx
je 0x765fb083
push 1
call fcn.765fb391
jmp 0x765fb083
mov eax, dword [esi + 0x60]
test eax, eax
mov edi, dword [esi + 0x38]
je 0x7660e91d
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push dword [esi + 0x6c]
call fcn.765e40a0
cmp dword [esi + 0x3c], 0
je 0x7660e97e
lea eax, [edi + 0x1c]
push eax
call fcn.76643aa4
mov eax, dword [edi + 0xc8]
test eax, eax
je 0x7660e968
mov ecx, dword [edi + 0xc4]
test ecx, ecx
jbe 0x7660e95d
lea ebx, [eax + 0x48]
mov dword [ebp + 8], ecx
push dword [ebx]
call fcn.765e40a0
add ebx, 0x4c
dec dword [ebp + 8]
jne 0x7660e94e
push dword [edi + 0xc8]
call fcn.765e40a0
push dword [edi + 0xc0]
call fcn.765e40a0
push edi
call fcn.765e40a0
push dword [esi + 0x44]
jmp 0x7660e9a5
mov ecx, dword [esi + 0x108]
test ecx, ecx
je 0x7660e98f
push 1
call fcn.765fa5cf
mov ecx, dword [esi + 0x10c]
test ecx, ecx
je 0x7660e9a0
push 1
call fcn.765fa5cf
test ebx, ebx
push edi
je 0x7660e9af
call fcn.765e40a0
jmp 0x765fb083
push 0x2c
jmp 0x7660ea77
mov ecx, dword [edi + 0x74]
test ecx, ecx
je 0x7660e9e2
mov eax, dword [edi + 0x70]
test eax, eax
mov ebx, ecx
jbe 0x7660e9da
mov dword [ebp + 8], eax
push ebx
call fcn.76645f24
add ebx, 0xd4
dec dword [ebp + 8]
jne 0x7660e9c9
push dword [edi + 0x74]
call fcn.765e40a0
push esi
call fcn.76641c96
test eax, eax
je 0x7660ea0c
cmp dword [edi + 0x58], 0
je 0x7660ea0c
cmp dword [edi + 0x5c], 0
je 0x7660ea0c
push dword [0x76666084]
call sym.CRYPT32.dll_I_CryptGetAsn1Encoder
push dword [edi + 0x5c]
push eax
call fcn.765fe821
cmp dword [edi + 8], 0
je 0x7660ea1f
mov eax, dword [edi + 0xc]
test eax, eax
je 0x7660ea1f
push eax
call fcn.765e40a0
push edi
call fcn.765e40a0
push dword [esi + 0x44]
jmp 0x765fb066
test byte [esi + 0x35], 0x80
je 0x7660ea58
xor edi, edi
xor ebx, ebx
cmp dword [esi + 0x58], edi
jbe 0x7660ea58
mov eax, dword [esi + 0x5c]
mov eax, dword [edi + eax]
test eax, eax
je 0x7660ea4f
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
inc ebx
add edi, 0xc
cmp ebx, dword [esi + 0x58]
jb 0x7660ea3c
push dword [esi + 0x5c]
jmp 0x7660e9a5
cmp dword [esi + 0x3c], 0
je 0x7660ea74
push dword [edi + 4]
call fcn.765e40a0
push edi
jmp 0x7660e9a5
push edi
push 2
push dword [0x76666084]
call sym.CRYPT32.dll_I_CryptGetAsn1Decoder
push eax
call fcn.765f2a64
jmp 0x765fb083
push 1
call fcn.765fa5cf
jmp 0x765fb091
push 1
call fcn.766476c0
jmp 0x765fb09f
push dword [0x76666084]
call sym.CRYPT32.dll_I_CryptGetAsn1Decoder
mov edi, dword [edi]
cmp edi, ebx
je 0x765fb0ee
push 1
push edi
push eax
call dword [sym.imp.MSASN1.dll_2rk_eR]
jmp 0x765fb0ee
cmp dword [esi + 0x24], ebx
jne 0x765fb0f8
mov eax, dword [esi + 0x20]
cmp eax, ebx
je 0x765fb0f8
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x765fb0f8
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x765fb13a
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x765fb105