Function at 0x409080
Capabilities:
Check if file exists
Create pipe
Delete file
Get common file path
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x539fcb
mov eax, dword fs:[0]
push eax
sub esp, 0x348
mov eax, dword [0x58d224]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1dc], ecx
push 0x104
push 0
lea eax, [ebp - 0x178]
push eax
call fcn.0050eb70
add esp, 0xc
lea ecx, [ebp - 0x178]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edx, [ebp - 0x178]
push edx
lea ecx, [ebp - 0x190]
call fcn.004077e0
mov dword [ebp - 4], 0
push 0x544d6c
lea ecx, [ebp - 0x190]
call fcn.004087b0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x23c], esp
push str.ChannelIstaller.exe
call fcn.00407920
call fcn.004088f0
add esp, 0x18
lea ecx, [ebp - 0x190]
call fcn.0040ba90
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x40913e
mov byte [ebp - 0x1dd], 1
jmp 0x409145
mov byte [ebp - 0x1dd], 0
mov al, byte [ebp - 0x1dd]
mov byte [ebp - 0x1de], al
lea ecx, [ebp - 0x190]
call fcn.0040ba90
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4092b5
movzx ecx, byte [ebp - 0x1de]
test ecx, ecx
jne 0x4092b5
push 0
call fcn.00513006
add esp, 4
push str..exe
call fcn.00512fe5
push eax
lea edx, [ebp - 0x2b8]
push edx
call fcn.0040c760
add esp, 8
mov dword [ebp - 0x224], eax
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x228], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x228]
push ecx
push str.ChannelIstaller
lea edx, [ebp - 0x178]
push edx
lea ecx, [ebp - 0x2a0]
call fcn.004077e0
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp - 0x22c]
mov dword [ebp - 0x230], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x230]
push ecx
lea edx, [ebp - 0x300]
push edx
call fcn.004057a0
add esp, 0xc
mov dword [ebp - 0x234], eax
mov eax, dword [ebp - 0x234]
mov dword [ebp - 0x238], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x238]
push ecx
lea edx, [ebp - 0x288]
push edx
call fcn.004056f0
add esp, 0xc
mov dword [ebp - 0x1ec], eax
mov eax, dword [ebp - 0x1ec]
mov dword [ebp - 0x1f0], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x1f0]
push ecx
lea edx, [ebp - 0x270]
push edx
call fcn.004057a0
add esp, 0xc
mov dword [ebp - 0x1f4], eax
mov eax, dword [ebp - 0x1f4]
push eax
lea ecx, [ebp - 0x190]
call fcn.00408110
lea ecx, [ebp - 0x270]
call fcn.00407de0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x288]
call fcn.00407de0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x300]
call fcn.00407de0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2a0]
call fcn.00407de0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2b8]
call fcn.00407de0
mov ecx, dword [ebp - 0x1dc]
mov edx, dword [ecx + 4]
mov dword [edx], 0x408f00
mov eax, dword [ebp - 0x1dc]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x1dc]
mov dword [ecx + 4], edx
push str.https:__static.lagofast.com_official_pc_client_channel_LGInstaller.exe
lea ecx, [ebp - 0x1a8]
call fcn.004077e0
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x1dc]
movzx ecx, byte [eax + 0x60]
test ecx, ecx
je 0x409308
push str.https:__envteststatic.lagofast.com_official_pc_client_channel_LGInstaller.exe
lea ecx, [ebp - 0x1a8]
call fcn.004081a0
lea edx, [ebp - 0x190]
push edx
lea eax, [ebp - 0x1a8]
push eax
mov ecx, dword [ebp - 0x1dc]
call fcn.00408c40
mov dword [ebp - 0x1f8], eax
cmp dword [ebp - 0x1f8], 0xc8
je 0x40937d
push 0
push 0
push 0x466
mov ecx, dword [ebp - 0x1dc]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
push str.down_load_up_grade_file_failed
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.00407de0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x190]
call fcn.00407de0
jmp 0x40980e
lea ecx, [ebp - 0x1c0]
call fcn.00407850
mov byte [ebp - 4], 6
push 0x64
push 0
lea eax, [ebp - 0x74]
push eax
call fcn.0050eb70
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str..pipe_autoupdate_pipe_lagofast__d
lea ecx, [ebp - 0x74]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0
push 0
push 0x200
push 0x200
push 1
push 0
push 0x40000003
lea edx, [ebp - 0x74]
push edx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov ecx, dword [ebp - 0x1dc]
mov dword [ecx + 0x20], eax
mov edx, dword [ebp - 0x1dc]
cmp dword [edx + 0x20], 0
je 0x409583
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2e8]
call fcn.00407920
mov dword [ebp - 0x1fc], eax
mov ecx, dword [ebp - 0x1fc]
mov dword [ebp - 0x200], ecx
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x200]
push edx
push str.__update_namepipestr
lea eax, [ebp - 0x2d0]
push eax
call fcn.00405930
add esp, 0xc
mov dword [ebp - 0x204], eax
mov ecx, dword [ebp - 0x204]
call fcn.0040bae0
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x2d0]
call fcn.00407e30
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x2e8]
call fcn.00407e30
lea ecx, [ebp - 0x74]
push ecx
lea ecx, [ebp - 0x258]
call fcn.00407920
mov byte [ebp - 4], 8
lea edx, [ebp - 0x258]
push edx
lea eax, [ebp - 0x354]
push eax
call fcn.0040a480
add esp, 8
mov dword [ebp - 0x208], eax
mov ecx, dword [ebp - 0x208]
push ecx
lea ecx, [ebp - 0x1c0]
call fcn.00408110
lea ecx, [ebp - 0x354]
call fcn.00407de0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x258]
call fcn.00407e30
mov ecx, dword [ebp - 0x1dc]
add ecx, 0x28
call fcn.004083b0
movzx edx, al
test edx, edx
je 0x4094e6
mov ecx, dword [ebp - 0x1dc]
add ecx, 0x28
call fcn.004056d0
mov ecx, eax
call fcn.0040c230
push 8
call fcn.004d48fc
add esp, 4
mov dword [ebp - 0x1e4], eax
mov byte [ebp - 4], 9
cmp dword [ebp - 0x1e4], 0
je 0x409554
mov eax, dword [ebp - 0x1dc]
mov dword [ebp - 0x20c], eax
mov dword [ebp - 0x210], 0x409d20
mov ecx, dword [ebp - 0x1dc]
add ecx, 0x20
push ecx
lea edx, [ebp - 0x20c]
push edx
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x33c]
push ecx
call fcn.004071f0
add esp, 0x10
push eax
mov ecx, dword [ebp - 0x1e4]
call fcn.004055a0
mov dword [ebp - 0x1e8], eax
jmp 0x40955e
mov dword [ebp - 0x1e8], 0
mov edx, dword [ebp - 0x1e8]
mov dword [ebp - 0x214], edx
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x214]
push eax
mov ecx, dword [ebp - 0x1dc]
add ecx, 0x28
call fcn.00407480
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x240], esp
lea edx, [ebp - 0x1c0]
push edx
call fcn.00407760
mov eax, dword [ebp - 0x1dc]
add eax, 0x30
push eax
lea ecx, [ebp - 0x190]
push ecx
call fcn.00409830
add esp, 0x20
mov byte [ebp - 0x1df], al
movzx edx, byte [ebp - 0x1df]
test edx, edx
jne 0x409742
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x330]
push eax
call fcn.0040c790
add esp, 8
mov dword [ebp - 0x218], eax
mov ecx, dword [ebp - 0x218]
mov dword [ebp - 0x21c], ecx
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x21c]
push edx
push str.execute_installer_failed_with_error:
lea eax, [ebp - 0x318]
push eax
call fcn.004057e0
add esp, 0xc
mov dword [ebp - 0x220], eax
mov ecx, dword [ebp - 0x220]
call fcn.0040ba90
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [ebp - 0x318]
call fcn.00407de0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x330]
call fcn.00407de0
lea ecx, [ebp - 0x190]
push ecx
lea edx, [ebp - 0x1d8]
push edx
call fcn.0040a320
add esp, 8
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x1dc]
add ecx, 0x48
call fcn.0040bcd0
movzx eax, al
test eax, eax
je 0x409683
push 0x544f18
mov ecx, dword [ebp - 0x1dc]
add ecx, 0x48
call fcn.004082c0
push 0
push 0
push 0x466
mov ecx, dword [ebp - 0x1dc]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [ebp - 0x1dc]
mov byte [eax + 0x18], 1
mov ecx, dword [ebp - 0x1dc]
cmp dword [ecx + 0x1c], 0
je 0x4096d2
mov edx, dword [ebp - 0x1dc]
mov eax, dword [edx + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp - 0x1dc]
mov edx, dword [ecx + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1dc]
cmp dword [eax + 0x20], 0
je 0x4096fe
mov ecx, dword [ebp - 0x1dc]
mov edx, dword [ecx + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1dc]
mov ecx, dword [eax + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x1d8]
call fcn.00407e30
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1c0]
call fcn.00407de0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.00407de0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x190]
call fcn.00407de0
jmp 0x40980e
mov edx, dword [ebp - 0x1dc]
mov byte [edx + 0x18], 1
mov eax, dword [ebp - 0x1dc]
cmp dword [eax + 0x1c], 0
je 0x409778
mov ecx, dword [ebp - 0x1dc]
mov edx, dword [ecx + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebp - 0x1dc]
mov ecx, dword [eax + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1dc]
cmp dword [edx + 0x20], 0
je 0x4097a4
mov eax, dword [ebp - 0x1dc]
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1dc]
mov eax, dword [edx + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x64
push 0x465
mov ecx, dword [ebp - 0x1dc]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x65
push 0x465
mov eax, dword [ebp - 0x1dc]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1c0]
call fcn.00407de0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.00407de0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x190]
call fcn.00407de0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d4e68
mov esp, ebp
pop ebp
ret