Function at 0x4049d0
Capabilities:
Check if file exists
Check mutex on windows
Create process on windows
Delete file
Get file attributes
Move file
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x436e4d
mov eax, dword fs:[0]
push eax
sub esp, 0x9e8
mov eax, dword [0x44b650]
xor eax, esp
mov dword [esp + 0x9e4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44b650]
xor eax, esp
push eax
lea eax, [esp + 0x9fc]
mov dword fs:[0], eax
mov esi, dword [esp + 0xa0c]
mov ebx, ecx
mov eax, esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404a21
sub eax, edx
cmp eax, 2
jge 0x404a4e
mov eax, dword [0x44cb08]
push 0
push str.LASTROGUE_Online
push str.Please_execute_launcher_program.
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405406
push 0x20
push esi
call fcn.00421cd0
mov esi, eax
add esp, 8
test esi, esi
mov ecx, ebx
jne 0x404a6d
push 4
call fcn.00402590
jmp 0x405406
lea ebp, [esi + 1]
push ebp
call fcn.004024f0
push 0x20
push ebp
mov byte [esi], 0
call fcn.00421cd0
mov edi, eax
add esp, 8
test edi, edi
mov ecx, ebx
jne 0x404a98
push 5
call fcn.00402590
jmp 0x405406
lea esi, [edi + 1]
push esi
call fcn.004024f0
push ebp
mov byte [edi], 0
call fcn.00422784
push 0x20
push esi
mov ebp, eax
call fcn.00421cd0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x404acb
push 6
mov ecx, ebx
call fcn.00402590
jmp 0x405406
push esi
mov byte [edi], 0
call fcn.00422784
xor esi, esi
mov dword [esp + 0x30], eax
add esp, 4
lea eax, [edi + 1]
mov dword [esp + 0xdc], 0xf
mov dword [esp + 0xd8], esi
mov byte [esp + 0xc8], 0
push eax
lea ecx, [esp + 0xc8]
mov dword [esp + 0xa08], esi
call fcn.00403c30
cmp dword [esp + 0xd8], esi
je 0x4053e7
cmp ebp, esi
je 0x4053e7
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
push str.LASTROGUE_Online_Launcher
push 0
push 0
call edi
mov esi, eax
call ebp
cmp eax, 0xb7
je 0x404b2f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x20]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov edx, dword [0x44cb08]
push 0x3e8
push edx
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ebp, 0x10
cmp dword [esp + 0xdc], ebp
mov dword [0x44cb04], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x1c], 1
jae 0x404b91
lea eax, [esp + 0xc8]
push str.TempPath
push eax
lea eax, [esp + 0x3f8]
push str._s_sReplace.pk
push eax
call fcn.004222e6
add esp, 0x10
lea ecx, [esp + 0x150]
call fcn.004019b0
push 0
lea ecx, [esp + 0x3f4]
push ecx
lea ecx, [esp + 0x158]
mov byte [esp + 0xa0c], 1
call fcn.00401a30
xor edi, edi
test eax, eax
je 0x404e1d
mov esi, 0xf
mov dword [esp + 0x14c], esi
mov dword [esp + 0x148], edi
mov byte [esp + 0x138], 0
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa0], edi
mov byte [esp + 0x90], 0
mov dword [esp + 0xf8], esi
mov dword [esp + 0xf4], edi
mov byte [esp + 0xe4], 0
push 1
lea edx, [esp + 0x1b]
mov bl, 4
push edx
lea ecx, [esp + 0x158]
mov byte [esp + 0xa0c], bl
call fcn.00401af0
push 1
lea eax, [esp + 0x1b]
push eax
lea ecx, [esp + 0x158]
call fcn.00401af0
cmp byte [esp + 0x17], 3
je 0x404def
lea ecx, [esp + 0x8c]
call fcn.00403590
lea ecx, [esp + 0xe0]
push ecx
lea edx, [esp + 0x90]
push edx
lea ecx, [esp + 0x158]
call fcn.00403c60
mov ecx, eax
call fcn.00403c60
push 1
lea ecx, [esp + 0x1b]
push ecx
mov ecx, eax
call fcn.00401af0
cmp dword [esp + 0xf8], ebp
mov eax, dword [esp + 0xe4]
jae 0x404cb5
lea eax, [esp + 0xe4]
push str.Replacer.exe
push eax
call fcn.00433836
add esp, 8
test eax, eax
je 0x404de4
mov dword [esp + 0x114], esi
mov dword [esp + 0x110], edi
mov byte [esp + 0x100], 0
mov dword [esp + 0x130], esi
mov dword [esp + 0x12c], edi
mov byte [esp + 0x11c], 0
push 0xffffffffffffffff
push edi
lea edx, [esp + 0xcc]
push edx
lea ecx, [esp + 0x124]
mov byte [esp + 0xa10], 5
call fcn.00403820
cmp dword [esp + 0xa0], edi
je 0x404d47
push 0x43abe0
lea ecx, [esp + 0x11c]
call fcn.00403ac0
push 0xffffffffffffffff
push edi
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x124]
call fcn.00403630
push 0x43abe0
lea ecx, [esp + 0x11c]
call fcn.00403ac0
push 0xffffffffffffffff
push edi
lea ecx, [esp + 0xe8]
push ecx
lea ecx, [esp + 0x124]
call fcn.00403630
push 0xffffffffffffffff
push edi
lea edx, [esp + 0xcc]
push edx
lea ecx, [esp + 0x108]
call fcn.00403820
push str.TempPath
lea ecx, [esp + 0x100]
call fcn.00403ac0
push 0x43abe0
lea ecx, [esp + 0x100]
call fcn.00403ac0
push 0xffffffffffffffff
push edi
lea eax, [esp + 0xe8]
push eax
lea ecx, [esp + 0x108]
call fcn.00403630
lea ecx, [esp + 0xfc]
push ecx
mov ecx, 0x44cb14
call fcn.00404920
lea ecx, [esp + 0xfc]
mov byte [esp + 0xa04], bl
call fcn.004032b0
cmp byte [esp + 0x17], 3
jne 0x404c61
lea ecx, [esp + 0xe0]
call fcn.00402f20
lea ecx, [esp + 0x8c]
call fcn.00402f20
lea ecx, [esp + 0x134]
mov byte [esp + 0xa04], 1
call fcn.00402f20
jmp 0x404e25
mov dword [esp + 0x1c], 0
lea ecx, [esp + 0x150]
call fcn.004019e0
mov ecx, 0x44cb14
call fcn.00401dd0
test al, al
jne 0x4051aa
mov ecx, 0x44cb14
call fcn.00401da0
mov edx, dword [0x44cb04]
push eax
push edi
push 0x406
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [esp + 0x20]
push eax
mov ecx, 0x44cb14
xor ebx, ebx
call fcn.00402e90
lea ecx, [esp + 0x30]
push ecx
mov ecx, 0x44cb14
call fcn.00402ec0
push eax
lea ecx, [esp + 0x24]
call fcn.00402670
test al, al
je 0x4051aa
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebp, dword [sym.imp.KERNEL32.dll_MoveFileA]
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x20]
call fcn.00402610
push eax
lea ecx, [esp + 0x90]
call fcn.00403a40
mov edx, dword [0x44cb04]
push 0
add ebx, 1
push ebx
push 0x402
push edx
mov byte [esp + 0xa14], 6
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [esp + 0xa4], 0x10
mov eax, dword [esp + 0x90]
jae 0x404ef1
lea eax, [esp + 0x90]
push eax
mov ecx, esi
call fcn.00401d20
test eax, eax
je 0x40511f
cmp dword [esp + 0xc0], 0x10
mov eax, dword [esp + 0xac]
jae 0x404f19
lea eax, [esp + 0xac]
push eax
mov ecx, esi
call fcn.00401d20
cmp eax, 1
jne 0x405038
cmp dword [esp + 0xc0], 0x10
mov eax, dword [esp + 0xac]
jae 0x404f42
lea eax, [esp + 0xac]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405038
xor esi, esi
jmp 0x404f60
cmp dword [esp + 0xc0], 0x10
mov eax, dword [esp + 0xac]
jae 0x404f78
lea eax, [esp + 0xac]
push 0x20
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x404fac
cmp dword [esp + 0xc0], 0x10
mov eax, dword [esp + 0xac]
jae 0x404f9d
lea eax, [esp + 0xac]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405038
push 0x1f4
call edi
add esi, 1
cmp esi, 0x14
jl 0x404f60
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0xc0], 0x10
mov ecx, dword [esp + 0xac]
jae 0x404fd9
lea ecx, [esp + 0xac]
push eax
push ecx
lea ecx, [esp + 0x274]
push str.Failed_to_replace__s_file._Please_Restart_Your_System_and_Try_agin..__error_code__d__
push ecx
call fcn.004222e6
mov esi, dword [esp + 0x28]
add esp, 0x10
push 0x10
push str.LASTROGUE_Online
lea edx, [esp + 0x274]
push edx
mov ecx, esi
call fcn.0040aa67
push 7
mov ecx, esi
call fcn.00402590
lea ecx, [esp + 0x8c]
call fcn.004032b0
lea ecx, [esp + 0x150]
mov byte [esp + 0xa04], 0
call fcn.00401b40
jmp 0x4053fa
mov ecx, dword [esp + 0xac]
mov eax, 0x10
cmp dword [esp + 0xc0], eax
jae 0x405054
lea ecx, [esp + 0xac]
cmp dword [esp + 0xa4], eax
mov eax, dword [esp + 0x90]
jae 0x40506b
lea eax, [esp + 0x90]
push ecx
push eax
call ebp
test eax, eax
jne 0x40516c
xor esi, esi
lea esp, [esp]
mov ecx, dword [esp + 0xac]
mov eax, 0x10
cmp dword [esp + 0xc0], eax
jae 0x40509c
lea ecx, [esp + 0xac]
cmp dword [esp + 0xa4], eax
mov eax, dword [esp + 0x90]
jae 0x4050b3
lea eax, [esp + 0x90]
push ecx
push eax
call ebp
test eax, eax
jne 0x40516c
push 0x1f4
call edi
add esi, 1
cmp esi, 0x14
jl 0x405080
cmp dword [esp + 0xc0], 0x10
mov esi, dword [esp + 0xac]
jae 0x4050e6
lea esi, [esp + 0xac]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea eax, [esp + 0x274]
push str.Failed_to_Move__s_file._Please_Restart_Your_System_and_Try_agin..__error_code__d__
push eax
call fcn.004222e6
add esp, 0x10
push 0x10
push str.LASTROGUE_Online
lea ecx, [esp + 0x274]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405013
cmp dword [esp + 0xa4], 0x10
mov eax, dword [esp + 0x90]
jae 0x405137
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x138]
call fcn.00403bf0
push 0
push 0x43abe0
lea ecx, [esp + 0x13c]
call fcn.00402a00
cmp eax, 0xffffffff
je 0x40525f
lea ecx, [esp + 0x134]
call fcn.00402f20
lea ecx, [esp + 0x8c]
mov byte [esp + 0xa04], 1
call fcn.004032b0
lea ecx, [esp + 0x20]
call fcn.00402640
lea eax, [esp + 0x30]
push eax
mov ecx, 0x44cb14
call fcn.00402ec0
push eax
lea ecx, [esp + 0x24]
call fcn.00402670
test al, al
jne 0x404e9f
cmp dword [esp + 0x1c], 0
je 0x4051bf
lea ecx, [esp + 0x3f0]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0xc8]
mov edi, 0x10
cmp dword [esp + 0xdc], edi
jae 0x4051db
lea eax, [esp + 0xc8]
push 0x43acc8
push str.client
push eax
lea edx, [esp + 0x500]
push 0
push edx
call fcn.00422755
add esp, 0x14
lea eax, [esp + 0x4f4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0xdc], edi
mov eax, dword [esp + 0xc8]
jae 0x40521d
lea eax, [esp + 0xc8]
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x1c]
push eax
call fcn.00403cd0
test eax, eax
jne 0x4052be
push edi
push str.LASTROGUE_Online
push str.Failed_to_write_updated_version.
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x150]
mov byte [esp + 0xa04], 0
call fcn.00401b40
jmp 0x4053fa
cmp dword [esp + 0xa4], 0x10
mov eax, dword [esp + 0x90]
jae 0x405277
lea eax, [esp + 0x90]
push eax
lea edx, [esp + 0x5fc]
push str.Update_temp_file___s__is_damaged._Please_try_again.
push edx
call fcn.004222e6
add esp, 0xc
push 0x10
push str.LASTROGUE_Online
lea eax, [esp + 0x600]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 7
mov ecx, esi
call fcn.00402590
lea ecx, [esp + 0x134]
call fcn.00402f20
jmp 0x405013
cmp dword [esp + 0xdc], edi
mov eax, dword [esp + 0xc8]
jae 0x4052d5
lea eax, [esp + 0xc8]
mov esi, dword [esp + 0x28]
push esi
push eax
lea edx, [esp + 0x2f4]
push str._s_s
push edx
call fcn.004222e6
add esp, 0x10
lea eax, [esp + 0x2ec]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40534f
lea ecx, [esp + 0x2ec]
push ecx
lea edx, [esp + 0x5fc]
push str.Launcher__s__file_is_not_exits.
push edx
call fcn.004222e6
add esp, 0xc
push edi
push str.LASTROGUE_Online
lea eax, [esp + 0x600]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x150]
mov byte [esp + 0xa04], 0
call fcn.00401b40
jmp 0x4053fa
push 0x40
lea ecx, [esp + 0x50]
push 0
push ecx
call fcn.00420fa0
add esp, 0xc
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x4c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x30c]
push ecx
push 0
mov dword [esp + 0x70], 0x44
mov dword [esp + 0x9c], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4053c9
push esi
lea edx, [esp + 0x5fc]
push str.Failed_to_execute_Launcher__s_.
push edx
call fcn.004222e6
add esp, 0xc
push edi
push str.LASTROGUE_Online
lea eax, [esp + 0x600]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
lea ecx, [esp + 0x150]
mov byte [esp + 0xa04], 0
call fcn.00401b40
jmp 0x4053fa
push 0x10
push str.WARNNING
push str.Abnormal_execute_detected.
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0xc4]
call fcn.00402f20
xor eax, eax
mov ecx, dword [esp + 0x9fc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x9e4]
xor ecx, esp
call fcn.00421b6f
add esp, 0x9f4
ret 4