Function at 0x402820
Capabilities:
Get common file path
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40a1ad
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5b0
mov eax, dword [str.VlZ6LdKiJtt7hQ0BCp0SFG5wKkvZRURR2Fu9GG418I]
push ebx
push esi
push edi
mov dword [esp + 0x5b4], eax
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x298]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
xor ebx, ebx
push 0xf01ff
mov dword [esp + 0x34], 0x104
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402b60
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x29c]
push edx
push eax
call dword [sym.imp.USERENV.dll_GetUserProfileDirectoryA]
test eax, eax
je 0x402b60
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov byte [esp + 0x190], bl
mov esi, dword [sym.imp.SHLWAPI.dll_PathCombineA]
mov ecx, 0x40
lea edi, [esp + 0x191]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x3a0], bl
mov ecx, 0x40
lea edi, [esp + 0x3a1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.Application_DataMozillaFirefox
lea edx, [esp + 0x29c]
stosb byte es:[edi], al
push edx
lea eax, [esp + 0x3a8]
push eax
call esi
push str.Application_DataMozillaFirefoxprofiles.ini
lea ecx, [esp + 0x29c]
push ecx
lea edx, [esp + 0x198]
push edx
call esi
sub esp, 0x1c
mov edi, esp
mov esi, 0xf
lea eax, [esp + 0x1ac]
mov dword [edi + 0x18], esi
mov dword [edi + 0x14], ebx
mov dword [esp + 0x3c], esp
mov byte [edi + 4], bl
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x402941
sub eax, ecx
push eax
lea eax, [esp + 0x1b0]
push eax
mov ecx, edi
call fcn.00401ce0
lea ecx, [esp + 0x84]
call fcn.00403080
mov dword [esp + 0x5c4], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x6c]
mov byte [esp + 0x5c8], 1
call fcn.00403980
push 8
push str.Profile0
lea ecx, [esp + 0x38]
mov dword [esp + 0x50], esi
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
call fcn.00401ce0
mov edi, dword [esp + 0x10]
cmp edi, dword [esp + 0x14]
mov byte [esp + 0x5c4], 2
je 0x402a36
push ebx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x40], esp
push 7
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push str.Default
mov byte [ecx + 4], bl
call fcn.00401ce0
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x64], esp
push 0xffffffffffffffff
push ebx
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push edi
mov byte [esp + 0x60c], 3
mov byte [ecx + 4], bl
call fcn.00401a70
lea ecx, [esp + 0xa4]
mov byte [esp + 0x600], 2
call fcn.004032d0
cmp eax, 1
je 0x402a29
mov eax, dword [esp + 0x14]
add edi, 0x1c
cmp edi, eax
jne 0x4029c1
jmp 0x402a36
push 0xffffffffffffffff
push ebx
push edi
lea ecx, [esp + 0x3c]
call fcn.00401a70
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x44], esp
push ebx
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push 0x40b251
mov byte [ecx + 4], bl
call fcn.00401ce0
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x58], esp
push 4
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push str.Path
mov byte [esp + 0x604], 4
mov byte [ecx + 4], bl
call fcn.00401ce0
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x78], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x8c]
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push edx
mov byte [esp + 0x624], 5
mov byte [ecx + 4], bl
call fcn.00401a70
lea eax, [esp + 0xa0]
push eax
lea ecx, [esp + 0xc0]
mov byte [esp + 0x61c], 2
call fcn.00403100
cmp dword [esp + 0x60], ebx
mov byte [esp + 0x5c4], 6
jne 0x402b67
mov eax, dword [esp + 0x64]
mov edi, 0x10
cmp eax, edi
jb 0x402aeb
mov ecx, dword [esp + 0x50]
push ecx
call fcn.00404753
add esp, 4
cmp dword [esp + 0x48], edi
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
jb 0x402b0a
mov edx, dword [esp + 0x34]
push edx
call fcn.00404753
add esp, 4
mov eax, dword [esp + 0x10]
cmp eax, ebx
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
je 0x402b40
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x10]
push edx
push ecx
push eax
call fcn.00401e00
mov edx, dword [esp + 0x20]
push edx
call fcn.00404753
add esp, 0x14
lea ecx, [esp + 0x68]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x5c4], 0xffffffff
call fcn.00402f20
xor eax, eax
jmp 0x402c92
xor eax, eax
mov byte [esp + 0x4a8], bl
mov ecx, 0x40
lea edi, [esp + 0x4a9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x88], bl
mov ecx, 0x40
lea edi, [esp + 0x89]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [esp + 0x64], 0x10
mov eax, dword [esp + 0x50]
jae 0x402baa
lea eax, [esp + 0x50]
mov edi, dword [sym.imp.SHLWAPI.dll_PathCombineA]
push eax
lea eax, [esp + 0x3a4]
push eax
lea ecx, [esp + 0x4b0]
push ecx
call edi
push 0x40b218
lea edx, [esp + 0x4ac]
push edx
lea eax, [esp + 0x90]
push eax
call edi
lea eax, [esp + 0x88]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402be4
sub eax, edx
push eax
lea ecx, [esp + 0x8c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00401ce0
mov eax, dword [esp + 0x64]
mov edi, 0x10
cmp eax, edi
jb 0x402c18
mov edx, dword [esp + 0x50]
push edx
call fcn.00404753
add esp, 4
cmp dword [esp + 0x48], edi
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
jb 0x402c37
mov eax, dword [esp + 0x34]
push eax
call fcn.00404753
add esp, 4
mov eax, dword [esp + 0x10]
cmp eax, ebx
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
je 0x402c6d
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x10]
push edx
push ecx
push eax
call fcn.00401e00
mov edx, dword [esp + 0x20]
push edx
call fcn.00404753
add esp, 0x14
lea ecx, [esp + 0x68]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x5c4], 0xffffffff
call fcn.00402f20
mov eax, 1
mov ecx, dword [esp + 0x5bc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x5b4]
call fcn.004046be
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret