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

Disassembly:
sub esp, 0x68
mov eax, dword [0x437478]
xor eax, esp
mov dword [esp + 0x64], eax
push ebx
mov ebx, dword [esp + 0x84]
push ebp
mov ebp, dword [esp + 0x78]
push esi
mov esi, dword [esp + 0x78]
push edi
or edi, 0xffffffff
mov dword [esp + 0x28], ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
test esi, esi
jne 0x405712
push ebx
push esi
push esi
push edi
call sub.nss3.dll_PK11_GetAllTokens
add esp, 0x10
mov dword [esp + 0x38], eax
test eax, eax
je 0x405757
mov esi, dword [eax]
mov dword [esp + 0x2c], esi
test esi, esi
je 0x4056f4
mov ebx, dword [sym.imp.nspr4.dll_PR_fprintf]
mov edi, dword [sym.imp.nspr4.dll_PR_GetSpecialFD]
lea ebx, [ebx]
push dword [esi + 8]
call sub.nss3.dll_PK11_GetSlotName
add esp, 4
push eax
push dword [esi + 8]
call sub.nss3.dll_PK11_GetTokenName
add esp, 4
push eax
push dword [0x439ae8]
push str._s:_Checking_token___.33s__in_slot___.65s__n
push 1
call edi
add esp, 4
push eax
call ebx
mov esi, dword [esi + 8]
xor edi, edi
push esi
mov dword [esp + 0x2c], edi
call sub.nss3.dll_PK11_NeedLogin
add esp, 0x18
test eax, eax
je 0x405448
push dword [esp + 0x1c]
push 1
push esi
call sub.nss3.dll_PK11_Authenticate
add esp, 0xc
test eax, eax
je 0x405448
push esi
call sub.nss3.dll_PK11_GetTokenName
push eax
push str.could_not_authenticate_to_token__s.
push dword [0x439ae8]
call fcn.0040bfd0
add esp, 0x10
or eax, 0xffffffff
jmp 0x4056d0
test ebp, ebp
je 0x405462
cmp byte [ebp], 0
je 0x405462
push dword [esp + 0x1c]
push ebp
push esi
call sub.nss3.dll_PK11_ListPrivKeysInSlot
add esp, 0xc
jmp 0x40546b
push esi
call sub.nss3.dll_PK11_ListPrivateKeysInSlot
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
jne 0x40548e
push str.problem_listing_keys
push dword [0x439ae8]
call fcn.0040bfd0
add esp, 8
or eax, 0xffffffff
jmp 0x4056d0
mov ebx, dword [eax]
mov dword [esp + 0x10], ebx
cmp ebx, eax
je 0x405692
mov ecx, dword [esp + 0x88]
test ecx, ecx
je 0x4054b3
mov eax, dword [ebx + 8]
cmp ecx, dword [eax + 4]
jne 0x405678
push dword [ebx + 8]
call sub.nss3.dll_PK11_GetPrivateKeyNickname
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4054ca
cmp byte [ebp], 0
jne 0x405515
push ebp
call sub.nssutil3.dll_PORT_Free_Util
push dword [ebx + 8]
xor ebp, ebp
call sub.nss3.dll_PK11_GetCertFromPrivateKey
mov esi, eax
add esp, 8
test esi, esi
je 0x405515
mov eax, dword [esi + 0x154]
test eax, eax
je 0x4054f2
cmp byte [eax], 0
jne 0x405501
mov eax, dword [esi + 0x118]
test eax, eax
je 0x40550c
cmp byte [eax], 0
je 0x40550c
push eax
call sub.nssutil3.dll_PORT_Strdup_Util
mov ebp, eax
add esp, 4
push esi
call sub.nss3.dll_CERT_DestroyCertificate
add esp, 4
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40553d
test ebp, ebp
je 0x40552f
push eax
push ebp
call sub.plc4.dll_PL_strcmp
add esp, 8
test eax, eax
je 0x40553d
push ebp
call sub.nssutil3.dll_PORT_Free_Util
add esp, 4
jmp 0x405671
test ebp, ebp
jne 0x405546
mov ebp, str._orphan_
mov edi, dword [ebx + 8]
push 1
mov dword [esp + 0x34], edi
call dword [sym.imp.nspr4.dll_PR_GetSpecialFD]
push edi
mov dword [esp + 0x3c], eax
call sub.nss3.dll_PK11_GetLowLevelKeyIDForPrivateKey
mov edi, eax
add esp, 8
mov dword [esp + 0x20], edi
test edi, edi
jne 0x40558c
mov eax, dword [str._no_CKA_ID_]
mov dword [esp + 0x48], eax
mov eax, dword [0x4276c4]
mov dword [esp + 0x4c], eax
mov eax, dword [0x4276c8]
mov dword [esp + 0x50], eax
jmp 0x405628
mov esi, dword [edi + 8]
mov ecx, esi
mov edx, dword [edi + 4]
test ecx, ecx
je 0x4055a8
mov al, byte [edx]
lea edx, [edx + 1]
sub al, 0x20
dec ecx
cmp al, 0x5e
ja 0x4055e0
test ecx, ecx
jne 0x405598
cmp esi, 0x28
jbe 0x4055b2
mov esi, 0x28
push esi
mov byte [esp + 0x4c], 0x22
lea eax, [esp + 0x4d]
push dword [edi + 4]
push eax
call fcn.00411cf0
lea eax, [esi + 2]
mov byte [esp + esi + 0x55], 0x22
add esp, 0xc
cmp eax, 0x2c
jae 0x40576c
mov byte [esp + eax + 0x48], 0
jmp 0x405628
mov ebx, dword [edi + 4]
cmp esi, 0x14
jbe 0x4055ed
mov esi, 0x14
lea edi, [esp + 0x48]
test ebx, ebx
je 0x405620
test esi, esi
je 0x40561d
lea esp, [esp]
movzx eax, byte [ebx]
push eax
push str._02x
push edi
call fcn.0040b060
add esp, 0xc
lea ebx, [ebx + 1]
add edi, 2
sub esi, 1
jne 0x405600
mov byte [edi], 0
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x48]
push ebp
push eax
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 4]
push dword [eax*4 + 0x4266a8]
push esi
push str.__2d____8.8s___42.42s__s_n
push dword [esp + 0x48]
call dword [sym.imp.nspr4.dll_PR_fprintf]
push 1
push edi
call sub.nssutil3.dll_SECITEM_ZfreeItem_Util
add esp, 0x20
cmp ebp, str._orphan_
je 0x40566c
push ebp
call sub.nssutil3.dll_PORT_Free_Util
add esp, 4
inc esi
mov dword [esp + 0x14], esi
mov ecx, dword [esp + 0x88]
mov ebx, dword [ebx]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], ebx
cmp ebx, eax
jne 0x4054a3
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x28]
push eax
call sub.nss3.dll_SECKEY_DestroyPrivateKeyList
add esp, 4
test edi, edi
jne 0x4056c8
push dword [0x439ae8]
mov edi, dword [sym.imp.nspr4.dll_PR_GetSpecialFD]
push str._s:_no_keys_found_n
push 1
call edi
mov ebx, dword [sym.imp.nspr4.dll_PR_fprintf]
add esp, 4
push eax
call ebx
add esp, 0xc
or eax, 0xffffffff
jmp 0x4056d6
mov ebx, dword [sym.imp.nspr4.dll_PR_fprintf]
xor eax, eax
mov edi, dword [sym.imp.nspr4.dll_PR_GetSpecialFD]
mov esi, dword [esp + 0x2c]
and dword [esp + 0x18], eax
mov esi, dword [esi]
mov dword [esp + 0x2c], esi
test esi, esi
jne 0x4053d0
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
push eax
call sub.nss3.dll_PK11_FreeSlotList
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.00410fde
add esp, 0x68
ret
push esi
call sub.nss3.dll_PK11_GetSlotName
add esp, 4
push eax
push esi
call sub.nss3.dll_PK11_GetTokenName
add esp, 4
push eax
push dword [0x439ae8]
push str._s:_Checking_token___.33s__in_slot___.65s__n
push 1
call dword [sym.imp.nspr4.dll_PR_GetSpecialFD]
add esp, 4
push eax
call dword [sym.imp.nspr4.dll_PR_fprintf]
push ebx
push dword [esp + 0xa0]
push ebp
push esi
call fcn.00405780
add esp, 0x24
mov edi, eax
mov ecx, dword [esp + 0x74]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00410fde
add esp, 0x68
ret
call fcn.00411113
int3