Function at 0x404f00
Capabilities:
Check if file exists
Get common file path
Get file attributes
Link many functions at runtime
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1054
call fcn.004c2cd0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x820
lea eax, [ebp - 0x1048]
push 0
push eax
call fcn.004ad600
add esp, 0xc
lea eax, [ebp - 0x828]
push 0x820
push 0
push eax
call fcn.004ad600
add esp, 0xc
mov dword [ebp - 0x104c], str.nss3.dll
push str.___Loading_f_reader
push 3
call fcn.00408d60
add esp, 8
cmp dword [0x4db474], 0
je 0x404f8d
push str.___Reader_already_initialized
push 3
call fcn.00408d60
mov eax, 1
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ac4d4
mov esp, ebp
pop ebp
ret
mov dword [0x4db470], 0
xor edi, edi
mov dword [ebp - 0x1054], 0x26
mov dword [ebp - 0x1050], 0x2a
nop dword [eax]
push 0x820
push 0
push 0x4db478
call fcn.004ad600
mov ebx, dword [ebp + edi*4 - 0x1054]
add esp, 0xc
push 0
push ebx
push 0x4db478
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4052c8
push str.Mozilla_Firefox
mov ecx, 0x4db478
call fcn.00404aa0
test eax, eax
js 0x4052b4
push 0x4db478
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40502f
inc edi
cmp edi, 2
jb 0x404fb0
push 0x4db478
push str.Firefox_path_not_found._Last_value_searched_is:__s
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
cmp ebx, 0x2a
jne 0x40503e
mov dword [0x4db470], 1
push 0x4db478
push str.Firefox_path_is:__s
push 3
call fcn.00408d60
add esp, 0xc
lea eax, [ebp - 0x828]
push eax
push 0x820
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x40507f
call esi
push eax
push str.Error_getting_current_dir:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
push 0x4db478
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x4050a5
call esi
push eax
push str.Error_setting_current_dir:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
xor edi, edi
nop word [eax + eax]
mov ebx, dword [ebp + edi*4 - 0x104c]
lea eax, [ebp - 0x1048]
push ebx
push 0x4db478
push 0x4cbe14
push 0x820
push eax
call fcn.004010a0
add esp, 0x14
test eax, eax
js 0x4052a0
lea eax, [ebp - 0x1048]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x4db474], eax
test eax, eax
je 0x405295
inc edi
cmp edi, 1
jb 0x4050b0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NSS_Init
push eax
call edi
mov dword [0x4dbc9c], eax
test eax, eax
jne 0x40512c
call esi
push eax
push str.Error_loading_function1:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
push str.PK11_GetInternalKeySlot
push dword [0x4db474]
call edi
mov dword [0x4db464], eax
test eax, eax
jne 0x405159
call esi
push eax
push str.Error_loading_function2:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
push str.PK11_Authenticate
push dword [0x4db474]
call edi
mov dword [0x4dbc98], eax
test eax, eax
jne 0x405186
call esi
push eax
push str.Error_loading_function3:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
push str.PK11SDR_Decrypt
push dword [0x4db474]
call edi
mov dword [0x4db460], eax
test eax, eax
jne 0x4051b3
call esi
push eax
push str.Error_loading_function4:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
push str.PK11_CheckUserPassword
push dword [0x4db474]
call edi
mov dword [0x4dbca8], eax
test eax, eax
jne 0x4051e0
call esi
push eax
push str.Error_loading_function6:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
push str.NSS_Shutdown
push dword [0x4db474]
call edi
mov dword [0x4db468], eax
test eax, eax
jne 0x40520d
call esi
push eax
push str.Error_loading_function7:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
push str.PK11_FreeSlot
push dword [0x4db474]
call edi
mov dword [0x4dbca4], eax
test eax, eax
jne 0x40523a
call esi
push eax
push str.Error_loading_function8:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
push str.SECITEM_AllocItem
push dword [0x4db474]
call edi
mov dword [0x4db46c], eax
test eax, eax
jne 0x405264
call esi
push eax
push str.Error_loading_function9:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
push str.SECITEM_FreeItem
push dword [0x4db474]
call edi
mov dword [0x4dbca0], eax
test eax, eax
jne 0x40528e
call esi
push eax
push str.Error_loading_function10:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
mov ebx, 1
jmp 0x4052dd
call esi
push eax
push ebx
push str.Cannot_open_the_library__s__error:0x_X
jmp 0x4052d1
call esi
push eax
push str.Error_generating_lib_path:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
call esi
push eax
push str.Cannot_get_the_firefox_lib_path:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052db
call esi
push eax
push ebx
push str.Cannot_read_the_firefox_folder_for__d__error:0x_X
push 1
call fcn.00408d60
add esp, 0x10
xor ebx, ebx
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
jne 0x4052f3
mov eax, dword [0x4db474]
test eax, eax
je 0x4052f3
push eax
call edi
xor eax, eax
cmp ax, word [ebp - 0x828]
je 0x405323
lea eax, [ebp - 0x828]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x405323
call esi
push eax
push str.Error_restoring_current_dir:0x_X
push 1
call fcn.00408d60
add esp, 0xc
jmp 0x4052e3
push str.Loading_f_reader___
push 3
call fcn.00408d60
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004ac4d4
mov esp, ebp
pop ebp
ret