Function at 0x407430
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x5c
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], ecx
mov eax, dword [0x450010]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor esi, esi
lea edi, [ebp - 0x48]
mov dword [edi], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], 0x5100
mov dword [esp], 0x445020
call sub.SHELL32.dll_SHGetKnownFolderPath
sub esp, 0x10
mov ebx, eax
mov eax, dword [edi]
test ebx, ebx
js 0x407696
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], 0
mov dword [esp], eax
mov esi, eax
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
mov ebx, eax
cmp eax, 7
mov dword [ebp - 0x58], esi
jbe 0x4076bb
mov al, byte [ebp - 0x40]
mov byte [esp + 4], al
mov dword [esp + 8], esi
mov dword [esp], ebx
lea ecx, [ebp - 0x28]
call fcn.00406a40
sub esp, 0xc
mov edi, dword [ebp - 0x50]
xor eax, eax
mov dword [ebp - 0x4c], eax
lea ecx, [ebp - 0x40]
mov dword [ecx], eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], 7
mov word [ecx], 0
mov eax, dword [edi + 0x34]
mov dword [esp], eax
call fcn.004077e0
sub esp, 4
mov eax, dword [edi + 0x34]
mov dword [ebp - 0x50], eax
cmp dword [edi + 0x38], 8
jb 0x4074fa
mov edi, dword [edi + 0x24]
jmp 0x4074fd
add edi, 0x24
cmp dword [ebp - 0x50], 0
je 0x407550
mov eax, dword [ebp - 0x50]
add eax, eax
mov dword [ebp - 0x50], eax
xor ebx, ebx
mov esi, edi
movzx eax, word [edi + ebx]
mov dword [esp], eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_towlower]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
cmp ecx, edx
jae 0x407671
lea edi, [ecx + 1]
mov dword [ebp - 0x30], edi
lea edi, [ebp - 0x40]
cmp edx, 8
jb 0x40753b
mov edi, dword [ebp - 0x40]
mov word [edi + ecx*2], ax
mov word [edi + ecx*2 + 2], 0
add ebx, 2
cmp dword [ebp - 0x50], ebx
mov edi, esi
jne 0x40750d
cmp dword [ebp - 0x2c], 8
jb 0x40755b
mov ecx, dword [ebp - 0x40]
jmp 0x40755e
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x4c]
call fcn.00407970
test al, al
je 0x4076e1
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov edx, ecx
sub edx, eax
cmp edx, 0x1b
jae 0x407701
mov al, byte [ebp - 0x44]
mov byte [esp + 4], al
mov eax, 0x1b
mov dword [esp + 0xc], eax
mov dword [esp], eax
mov dword [esp + 8], 0x44b4c0
lea ecx, [ebp - 0x28]
call fcn.004066c0
sub esp, 0x10
mov esi, dword [ebp - 0x4c]
mov dword [esp], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov edi, edx
sub edi, ecx
cmp edi, eax
jae 0x407711
mov cl, byte [ebp - 0x44]
mov byte [esp + 4], cl
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp], eax
lea ecx, [ebp - 0x28]
call fcn.004066c0
sub esp, 0x10
mov esi, dword [ebp - 0x54]
mov byte [esi + 0x18], 0
movsd xmm0, qword [ebp - 0x18]
movsd qword [esi + 0x10], xmm0
movups xmm0, xmmword [ebp - 0x28]
movups xmmword [esi], xmm0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], 0
mov ecx, dword [ebp - 0x2c]
cmp ecx, 8
jb 0x40762e
mov eax, dword [ebp - 0x40]
inc ecx
test ecx, 0x7ffff800
jne 0x407728
mov dword [esp], eax
call dword [sym.imp.mozglue.dll_free]
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x40763e
mov dword [esp], eax
call dword [sym.imp.mozglue.dll_free]
mov ecx, dword [ebp - 0x14]
cmp ecx, 8
jae 0x407743
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x40765d
mov dword [esp], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
sub esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004230e0
mov eax, esi
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret
mov cl, byte [ebp - 0x44]
mov byte [esp + 4], cl
movzx eax, ax
mov dword [esp + 8], eax
mov dword [esp], 1
lea ecx, [ebp - 0x40]
call fcn.004110c0
sub esp, 0xc
jmp 0x407546
mov dword [esp], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
sub esp, 4
mov esi, dword [ebp - 0x54]
mov byte [esi + 0x18], 1
mov dword [esi], str._builds_worker_checkouts_gecko_toolkit_xre_LauncherRegistryInfo.cpp
mov dword [esi + 4], 0x255
mov dword [esi + 8], ebx
jmp 0x40765d
lea eax, [ebp - 0x28]
mov dword [eax + 0x10], ebx
mov ecx, ebx
add ecx, ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.ntdll.dll_memmove
mov word [ebp + ebx*2 - 0x28], 0
jmp 0x4074bf
mov esi, dword [ebp - 0x54]
mov byte [esi + 0x18], 1
mov dword [esi], str._builds_worker_checkouts_gecko_toolkit_xre_LauncherRegistryInfo.cpp
mov dword [esi + 4], 0x262
mov dword [esi + 8], 0x8007000d
jmp 0x40760d
lea edx, [eax + 0x1b]
mov dword [ebp - 0x18], edx
cmp ecx, 8
jb 0x40776f
mov ecx, dword [ebp - 0x28]
jmp 0x407772
lea edi, [ecx + eax]
mov dword [ebp - 0x18], edi
cmp edx, 8
jb 0x4077af
mov ebx, dword [ebp - 0x28]
jmp 0x4077b2
mov ecx, dword [eax - 4]
add eax, 0xfffffffc
sub eax, ecx
cmp eax, 0x20
jae 0x4077d2
mov eax, ecx
mov esi, dword [ebp - 0x54]
jmp 0x407625
mov eax, dword [ebp - 0x28]
inc ecx
test ecx, 0x7ffff800
je 0x40775e
mov ecx, dword [eax - 4]
add eax, 0xfffffffc
sub eax, ecx
cmp eax, 0x20
jae 0x4077d2
mov eax, ecx
mov dword [esp], eax
call dword [sym.imp.mozglue.dll_free]
mov esi, dword [ebp - 0x54]
jmp 0x40764a
lea ecx, [ebp - 0x28]
movsd xmm0, qword [0x44b4ee]
movsd qword [ecx + eax*2 + 0x2e], xmm0
movups xmm0, xmmword [0x44b4e0]
movups xmmword [ecx + eax*2 + 0x20], xmm0
movups xmm0, xmmword [0x44b4d0]
movups xmmword [ecx + eax*2 + 0x10], xmm0
movups xmm0, xmmword [0x44b4c0]
movups xmmword [ecx + eax*2], xmm0
mov word [ecx + eax*2 + 0x36], 0
jmp 0x4075a7
lea ebx, [ebp - 0x28]
lea ecx, [ebx + ecx*2]
add eax, eax
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], ecx
call sub.ntdll.dll_memmove
mov word [ebx + edi*2], 0
jmp 0x4075e1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3