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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x460
mov eax, dword [0x101d2014]
mov esi, dword [ebp + 8]
xor eax, ebp
mov dword [esp + 0x458], eax
mov eax, dword [esi + 0x3dc]
test eax, eax
je 0x1016e35e
xor ebx, ebx
jmp 0x1016e371
cmp dword [esi + 0x3d8], 0
je 0x1016e35a
cmp dword [esi + 0x3d4], 0
setne bl
cmp dword [esi + 0x538], 0
je 0x1016e383
push 0
push 0xffffe001
jmp 0x1016e3ac
cmp dword [esi + 0x534], 0
je 0x1016e3cf
test eax, eax
setne cl
or cl, bl
jne 0x1016e39b
cmp dword [esi + 0x38], 0
je 0x1016e3cf
mov dword [esi + 0x538], fcn.1016e330
push 0
push 0xffffe892
call sym.nss3.dll_PR_SetError
add esp, 8
xor ebx, ebx
dec ebx
mov ecx, dword [esp + 0x458]
xor ecx, ebp
call fcn.10192ef0
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
test byte [esi + 0x1d], 4
jne 0x1016e3e9
push dword [esi + 0x168]
call sym.nss3.dll_PR_EnterMonitor
add esp, 4
mov eax, dword [esi + 0x3dc]
test eax, eax
mov dword [esp + 0x10], ebx
je 0x1016e43e
mov dword [esi + 0x3dc], 0
movzx eax, word [esi + 0x58]
cmp eax, 0x303
jbe 0x1016e44b
mov eax, dword [esi + 0x97c]
add eax, 4
push eax
push 0xb
push esi
call fcn.10161ad0
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x1016ec0f
push 1
push dword [esi + 0x97c]
push dword [esi + 0x978]
push esi
call fcn.10176400
add esp, 0x10
jmp 0x1016e458
test bl, bl
je 0x1016e47b
mov ecx, esi
call fcn.1016dcf0
jmp 0x1016e471
push 3
push 0xb
push esi
call fcn.10161ad0
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x1016ec0f
xor eax, eax
push 3
push eax
push eax
push esi
call fcn.10176380
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x1016ec0f
mov edi, dword [esi + 0x7c]
test edi, edi
je 0x1016e48b
mov dword [esi + 0x7c], 0
jmp 0x1016e4a2
mov ecx, 0xd4
add ecx, dword [esi + 0x78]
call fcn.100f9910
mov edi, eax
test eax, eax
je 0x1016e669
mov eax, dword [esi + 0x48c]
mov eax, dword [eax + 4]
mov dword [esi + 0x8c], eax
push edi
call fcn.100fa000
add esp, 4
mov dword [esi + 0x90], eax
mov eax, dword [esi + 0x48c]
mov eax, dword [eax + 4]
cmp eax, 4
je 0x1016e5ae
cmp eax, 2
je 0x1016e5bf
cmp eax, 1
jne 0x1016e652
xor ebx, ebx
mov dword [esp + 4], edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
test byte [esi + 0x1d], 4
jne 0x1016e50a
push dword [esi + 0x174]
call fcn.1013e140
add esp, 4
movzx eax, word [esi + 0x58]
mov ecx, dword [esi + 0x11c]
lea edi, [esp + 0x438]
mov word [esp + 0xc], ax
mov eax, dword [esi + 0x3bc]
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 4]
mov dword [edi], 0x370
mov dword [edi + 4], 1
mov eax, dword [eax*8 + 0x101a7834]
mov dword [edi + 8], eax
push ecx
push 3
push ebx
push ebx
push edi
call fcn.101396c0
add esp, 0x14
mov ebx, eax
test eax, eax
jne 0x1016e578
xor eax, eax
push dword [esp + 8]
push 2
push eax
push eax
push edi
call fcn.101396c0
add esp, 0x14
mov ebx, eax
test eax, eax
je 0x1016e84c
mov edx, dword [esp + 8]
cmp dword [esi + 0x9f8], 1
movzx eax, word [esi + 0x5a]
jne 0x1016e692
mov edi, dword [esp + 4]
add eax, 0xfffffcfe
cmp ax, 2
ja 0x1016e698
cwde
movzx eax, word [eax + eax + 0x101a8148]
jmp 0x1016e69b
push edi
push esi
call fcn.1016ee00
add esp, 8
mov ebx, eax
jmp 0x1016e9a8
xor eax, eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 0x402
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], 1
cmp dword [edi + 4], 4
jne 0x1016e67e
movzx eax, word [esi + 0x58]
lea edx, [esp + 0x30]
lea ecx, [edi + 0x14]
lea ebx, [esp + 0x2c]
mov word [esp + 4], ax
lea eax, [edi + 0x20]
push edx
push ebx
push eax
push ecx
push esi
call fcn.1017ea60
add esp, 0x14
test eax, eax
je 0x1016e6f3
lea eax, [esp + 0x438]
mov dword [eax], 0x10002
mov ecx, dword [edi + 0x18]
mov dword [eax + 8], ecx
mov ecx, dword [edi + 0x1c]
mov dword [eax + 0xc], ecx
mov ecx, dword [edi + 0x24]
mov dword [eax + 0x14], ecx
mov ecx, dword [edi + 0x28]
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], 0x101a80cc
mov dword [eax + 0x18], ecx
mov ecx, 0x101a80cc
jmp 0x1016e6fb
push 0
push 0xffffe001
call sym.nss3.dll_PR_SetError
add esp, 8
push edi
call sym.nss3.dll_SECKEY_DestroyPublicKey
jmp 0x1016e673
push 0xffffd043
call fcn.10176550
add esp, 4
xor ebx, ebx
dec ebx
jmp 0x1016ec0f
push 0
push 0xffffe00e
call sym.nss3.dll_PR_SetError
add esp, 8
jmp 0x1016e9a5
mov edi, dword [esp + 4]
jmp 0x1016e69b
xor eax, eax
dec eax
rol ax, 8
lea ecx, [esp + 0x30]
mov word [ecx], ax
lea eax, [esp + 0x34]
mov dword [eax + 4], ecx
mov dword [eax + 8], 2
push edx
push 0
push eax
push 0x370
push ebx
call sym.nss3.dll_PK11_KeyGen
add esp, 0x14
lock dec dword [ebx + 0x48]
jne 0x1016e6d9
push ebx
mov ebx, eax
call fcn.10135de0
mov eax, ebx
add esp, 4
test eax, eax
jne 0x1016e861
push 0xffffd045
call fcn.10176550
add esp, 4
jmp 0x1016e85f
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x28]
mov dword [esi + 0x94], ecx
push edx
push eax
push ecx
call fcn.10166450
add esp, 0xc
test eax, eax
je 0x1016e72a
push 0xffffe064
call fcn.10176550
add esp, 4
mov ebx, dword [esp + 0x28]
jmp 0x1016e98b
movzx eax, word [esp + 4]
mov ebx, dword [esp + 0x28]
xor ecx, ecx
cmp eax, 0x300
mov eax, dword [ebx + 0xc]
seta cl
lea ecx, [ecx*4 + 0x373]
mov edx, dword [eax + 4]
mov dword [esp + 8], edx
xor edx, edx
push edx
push edx
push 0x10c
push ecx
push 0x21
push edx
push edx
push edx
push edi
push dword [eax]
call fcn.10133810
add esp, 0x28
test eax, eax
je 0x1016e97e
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x14], ebx
mov dword [esp + 4], edi
mov eax, dword [eax + 0xc]
add eax, 2
push eax
push 0x10
push esi
call fcn.10161ad0
add esp, 0xc
test eax, eax
jne 0x1016e833
mov eax, dword [esp + 8]
mov edi, dword [eax + 0x1c]
mov ebx, dword [eax + 0x34]
lea eax, [esp + 0x18]
push 2
push 0
push edi
push eax
call fcn.10175b50
add esp, 0x10
test eax, eax
jne 0x1016e833
mov eax, edi
sub eax, ebx
je 0x1016e7dc
sub ebx, edi
xor edi, edi
push 1
push edi
push edi
lea eax, [esp + 0x24]
push eax
call fcn.10175b50
add esp, 0x10
test eax, eax
jne 0x1016e833
inc ebx
jne 0x1016e7c4
mov eax, dword [esp + 8]
push dword [eax + 0x34]
push dword [eax + 0x30]
lea eax, [esp + 0x20]
push eax
call fcn.10175ab0
add esp, 0xc
test eax, eax
jne 0x1016e833
mov edx, dword [esp + 0x18]
mov ecx, esi
push 0
push dword [esp + 0x20]
call fcn.101761e0
add esp, 8
test eax, eax
jne 0x1016e833
push 1
push dword [esp + 0x10]
push esi
call fcn.1015fea0
add esp, 0xc
test eax, eax
je 0x1016ed1c
push 0xffffd045
call fcn.10176550
add esp, 4
push dword [esp + 0xc]
call sym.nss3.dll_PK11_FreeSymKey
add esp, 4
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0x14]
jmp 0x1016e98b
push 0
push 0xffffd054
call sym.nss3.dll_PR_SetError
add esp, 8
mov edi, dword [esp + 4]
xor eax, eax
test byte [esi + 0x1d], 4
jne 0x1016e879
push dword [esi + 0x174]
mov ebx, eax
call fcn.1013e210
mov eax, ebx
add esp, 4
test eax, eax
je 0x1016e8b9
mov dword [esp + 8], eax
push edi
call fcn.100fa000
add esp, 4
lea ecx, [eax + 7]
shr ecx, 3
cmp eax, 0x2001
mov dword [esp + 0x20], ecx
jb 0x1016e8fd
push 0x2f
push 2
push esi
call fcn.1015f2c0
add esp, 0xc
push 0xffffd045
call fcn.10176550
add esp, 4
xor ebx, ebx
jmp 0x1016e8d0
push 0xffffd045
call fcn.10176550
add esp, 4
xor ebx, ebx
mov dword [esp + 8], 0
dec ebx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1016e8e3
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov eax, dword [esp + 8]
test eax, eax
je 0x1016e9a8
push eax
call sym.nss3.dll_PK11_FreeSymKey
add esp, 4
jmp 0x1016e9a8
push ecx
call sym.nss3.dll_PORT_Alloc_Util
add esp, 4
xor ebx, ebx
mov dword [esp + 0x1c], eax
dec ebx
test eax, eax
je 0x1016e8d1
xor eax, eax
cmp dword [edi + 4], 1
lea ecx, [esp + 0x18]
sete al
lea eax, [eax + eax - 1]
push ecx
push dword [esp + 0xc]
push 0
push eax
push edi
call fcn.10132a10
add esp, 0x14
test eax, eax
je 0x1016e948
push 0xffffd045
mov ebx, eax
call fcn.10176550
add esp, 4
jmp 0x1016e8d1
movzx ecx, word [esp + 0xc]
mov edi, dword [esp + 0x20]
lea eax, [edi + 2]
cmp ecx, 0x300
mov dword [esp + 0xc], ecx
cmovbe eax, edi
push eax
push 0x10
push esi
call fcn.10161ad0
add esp, 0xc
test eax, eax
je 0x1016ec66
mov edi, dword [esp + 4]
jmp 0x1016ecd6
push 0xffffd045
call fcn.10176550
add esp, 4
test ebx, ebx
je 0x1016e998
push ebx
call fcn.10180760
add esp, 4
lea eax, [esp + 0x18]
push eax
call fcn.10175fe0
add esp, 4
xor ebx, ebx
dec ebx
push edi
call sym.nss3.dll_SECKEY_DestroyPublicKey
add esp, 4
test ebx, ebx
jne 0x1016ec0f
cmp byte [esp + 0x10], 0
je 0x1016ebd0
xor eax, eax
mov edi, dword [esi + 0x3d4]
mov dword [esp + 0x43c], eax
mov dword [esp + 0x438], eax
mov dword [esp + 0x440], eax
test byte [esi + 0x1d], 4
jne 0x1016e9f5
push dword [esi + 0x174]
call fcn.1013e010
add esp, 4
cmp dword [esi + 0x454], 3
jne 0x1016ea23
push dword [esi + 0x488]
call fcn.10161d60
add esp, 4
mov ecx, dword [esi + 0x494]
mov edx, 4
mov ecx, dword [ecx + 0x10]
test ecx, ecx
cmovne edx, ecx
cmp eax, edx
jne 0x1016ea95
mov edx, dword [esi + 0x3bc]
lea eax, [esp + 0x34]
mov ecx, esi
push 0
push eax
call fcn.101623a0
add esp, 8
mov ebx, eax
test byte [esi + 0x1d], 4
jne 0x1016ea50
push dword [esi + 0x174]
call fcn.1013e0d0
add esp, 4
test ebx, ebx
jne 0x1016eb9f
movzx ecx, word [esi + 0x58]
mov ebx, dword [esi + 0x488]
xor eax, eax
lea edx, [esp + 0x34]
cmp ecx, 0x300
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x438]
seta al
push ecx
push eax
push ebx
push edi
push edx
call fcn.1015f440
add esp, 0x14
test eax, eax
je 0x1016eac7
xor ebx, ebx
dec ebx
jmp 0x1016eb9f
mov ecx, dword [esi + 0x458]
mov edx, dword [esi + 0x45c]
lea ebx, [esp + 0x34]
push ebx
push eax
call fcn.101628f0
add esp, 8
test eax, eax
je 0x1016eae4
mov ebx, eax
push 0xffffd07f
call fcn.10176550
add esp, 4
jmp 0x1016ea3c
cmp dword [esi + 0x60], 0
je 0x1016eaeb
mov dword [esi + 0x88], ebx
push ebx
call fcn.1015f730
add esp, 4
mov dword [esi + 0x80], eax
jmp 0x1016eb31
xor ebx, ebx
jmp 0x1016ea3c
mov eax, dword [edi + 8]
mov ecx, dword [esi + 0xc4]
lock inc dword [eax + 0x48]
movzx edx, word [eax + 0x80]
mov word [ecx + 0xe8], dx
mov edx, dword [eax + 0x40]
mov dword [ecx + 0xe4], edx
mov edx, dword [eax + 4]
mov edx, dword [edx + 0x38]
mov dword [ecx + 0xe0], edx
mov byte [ecx + 0xeb], 1
lock dec dword [eax + 0x48]
jne 0x1016eb31
push eax
call fcn.10135de0
add esp, 4
movzx edi, word [esp + 0x10]
mov ecx, dword [esp + 0x440]
xor eax, eax
cmp edi, 0x303
sete al
lea eax, [ecx + eax*2 + 2]
push eax
push 0xf
push esi
call fcn.10161ad0
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x1016eb9f
cmp edi, 0x303
jne 0x1016eb84
mov eax, dword [esi + 0x488]
mov ecx, eax
sar ecx, 0x1f
push 2
push ecx
push eax
push esi
call fcn.10176380
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x1016eb9f
push 2
push dword [esp + 0x444]
push dword [esp + 0x444]
push esi
call fcn.10176400
add esp, 0x10
mov ebx, eax
mov eax, dword [esp + 0x43c]
test eax, eax
je 0x1016ebb4
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push dword [esi + 0x3d4]
call sym.nss3.dll_SECKEY_DestroyPrivateKey
add esp, 4
test ebx, ebx
mov dword [esi + 0x3d4], 0
jne 0x1016ec0f
mov ecx, esi
call fcn.1016df70
mov ebx, eax
test eax, eax
jne 0x1016ec0f
mov dword [esi + 0x3c], 1
cmp dword [esi + 0x38], 0
jne 0x1016ec00
mov eax, dword [esi + 0x1c]
bt eax, 0x10
jae 0x1016ec00
cmp dword [esi + 0x534], 0
je 0x1016ec83
mov ecx, esi
xor edx, edx
call fcn.1016e070
mov ebx, eax
test eax, eax
je 0x1016ec2c
test byte [esi + 0x1d], 4
jne 0x1016e3b7
push dword [esi + 0x168]
call sym.nss3.dll_PR_ExitMonitor
add esp, 4
jmp 0x1016e3b7
test byte [esi + 0x1d], 4
jne 0x1016ec40
push dword [esi + 0x168]
call sym.nss3.dll_PR_ExitMonitor
add esp, 4
push 0x23
push esi
call fcn.10170340
add esp, 8
xor ecx, ecx
test eax, eax
setne cl
xor ebx, ebx
lea eax, [ecx*8 + 6]
mov dword [esi + 0x450], eax
jmp 0x1016e3b7
cmp dword [esp + 0xc], 0x301
mov edx, dword [esp + 0x1c]
jb 0x1016ecc1
push 2
push edi
push edx
push esi
call fcn.10176400
add esp, 0x10
jmp 0x1016ecce
bt eax, 0xa
jb 0x1016ec97
push dword [esi + 0x168]
call sym.nss3.dll_PR_ExitMonitor
add esp, 4
mov ecx, esi
call fcn.10167150
test byte [esi + 0x1d], 4
mov ebx, eax
jne 0x1016ecb4
push dword [esi + 0x168]
call sym.nss3.dll_PR_EnterMonitor
add esp, 4
test ebx, ebx
jne 0x1016ec0f
jmp 0x1016ec00
mov ecx, esi
push 0
push edi
call fcn.101761e0
add esp, 8
mov edi, dword [esp + 4]
test eax, eax
je 0x1016ecdd
mov ebx, eax
jmp 0x1016e8d1
push 1
push dword [esp + 0xc]
push esi
call fcn.1015fea0
add esp, 0xc
mov dword [esp + 4], eax
push dword [esp + 8]
call sym.nss3.dll_PK11_FreeSymKey
add esp, 4
cmp dword [esp + 4], 0
mov dword [esp + 8], 0
je 0x1016ed15
push 0xffffd045
jmp 0x1016e93e
xor ebx, ebx
jmp 0x1016e8d1
lea eax, [esp + 0x18]
push eax
call fcn.10175fe0
add esp, 4
push dword [esp + 0xc]
call sym.nss3.dll_PK11_FreeSymKey
add esp, 4
push dword [esp + 0x14]
call fcn.10180760
add esp, 4
mov edi, dword [esp + 4]
xor ebx, ebx
jmp 0x1016e9a8