Function at 0x404680
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 0x4369dd
mov eax, dword fs:[0]
push eax
sub esp, 0x9e8
mov eax, dword [0x44a650]
xor eax, esp
mov dword [esp + 0x9e4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44a650]
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 0x4046d1
sub eax, edx
cmp eax, 2
jge 0x4046fe
mov eax, dword [0x44bb08]
push 0
push str.Silkroad_Online
push str.Please_execute_launcher_program.
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40503c
push 0x20
push esi
call fcn.00421900
mov esi, eax
add esp, 8
test esi, esi
mov ecx, ebx
jne 0x40471d
push 4
call fcn.00402500
jmp 0x40503c
lea ebp, [esi + 1]
push ebp
call fcn.00402460
push 0x20
push ebp
mov byte [esi], 0
call fcn.00421900
mov edi, eax
add esp, 8
test edi, edi
mov ecx, ebx
jne 0x404748
push 5
call fcn.00402500
jmp 0x40503c
lea esi, [edi + 1]
push esi
call fcn.00402460
push ebp
mov byte [edi], 0
call fcn.00422304
push 0x20
push esi
mov ebp, eax
call fcn.00421900
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x40477b
push 6
mov ecx, ebx
call fcn.00402500
jmp 0x40503c
push esi
mov byte [edi], 0
call fcn.00422304
xor esi, esi
mov dword [esp + 0x30], eax
add esp, 4
lea eax, [edi + 1]
mov dword [esp + 0xa4], 0xf
mov dword [esp + 0xa0], esi
mov byte [esp + 0x90], 0
push eax
lea ecx, [esp + 0x90]
mov dword [esp + 0xa08], esi
call fcn.004038e0
cmp dword [esp + 0xa0], esi
je 0x40501d
cmp ebp, esi
je 0x40501d
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Silkroad_Online_Launcher
push 0
push 0
call edi
mov esi, eax
call ebp
cmp eax, 0xb7
je 0x4047df
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 [0x44bb08]
push 0x3e8
push edx
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ebp, 0x10
cmp dword [esp + 0xa4], ebp
mov dword [0x44bb04], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x1c], 1
jae 0x404841
lea eax, [esp + 0x90]
push str.TempPath
push eax
lea eax, [esp + 0x3f8]
push str._s_sReplace.pk
push eax
call fcn.00421e64
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 0x404ac1
mov esi, 0xf
mov dword [esp + 0xc0], esi
mov dword [esp + 0xbc], edi
mov byte [esp + 0xac], 0
mov dword [esp + 0x14c], esi
mov dword [esp + 0x148], edi
mov byte [esp + 0x138], 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 0x404a93
lea ecx, [esp + 0xe0]
push ecx
lea edx, [esp + 0x138]
push edx
lea ecx, [esp + 0x158]
call fcn.00403910
mov ecx, eax
call fcn.00403910
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 0x404959
lea eax, [esp + 0xe4]
push str.Replacer.exe
push eax
call fcn.004333c6
add esp, 8
test eax, eax
je 0x404a88
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 + 0x94]
push edx
lea ecx, [esp + 0x124]
mov byte [esp + 0xa10], 5
call fcn.00403480
cmp dword [esp + 0x148], edi
je 0x4049eb
push 0x439be0
lea ecx, [esp + 0x11c]
call fcn.00403720
push 0xffffffffffffffff
push edi
lea eax, [esp + 0x13c]
push eax
lea ecx, [esp + 0x124]
call fcn.00403290
push 0x439be0
lea ecx, [esp + 0x11c]
call fcn.00403720
push 0xffffffffffffffff
push edi
lea ecx, [esp + 0xe8]
push ecx
lea ecx, [esp + 0x124]
call fcn.00403290
push 0xffffffffffffffff
push edi
lea edx, [esp + 0x94]
push edx
lea ecx, [esp + 0x108]
call fcn.00403480
push str.TempPath
lea ecx, [esp + 0x100]
call fcn.00403720
push 0x439be0
lea ecx, [esp + 0x100]
call fcn.00403720
push 0xffffffffffffffff
push edi
lea eax, [esp + 0xe8]
push eax
lea ecx, [esp + 0x108]
call fcn.00403290
lea ecx, [esp + 0xfc]
push ecx
mov ecx, 0x44bb14
call fcn.004045d0
lea ecx, [esp + 0xfc]
mov byte [esp + 0xa04], bl
call fcn.004030d0
cmp byte [esp + 0x17], 3
jne 0x404911
lea ecx, [esp + 0xe0]
call fcn.00402d40
lea ecx, [esp + 0x134]
call fcn.00402d40
lea ecx, [esp + 0xa8]
mov byte [esp + 0xa04], 1
call fcn.00402d40
jmp 0x404ac9
mov dword [esp + 0x1c], 0
lea ecx, [esp + 0x150]
call fcn.004019e0
mov ecx, 0x44bb14
call fcn.00401dd0
test al, al
jne 0x404df9
mov ecx, 0x44bb14
call fcn.00401da0
mov edx, dword [0x44bb04]
push eax
push edi
push 0x406
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [esp + 0x20]
push eax
mov ecx, 0x44bb14
xor ebx, ebx
call fcn.00402cb0
lea ecx, [esp + 0x30]
push ecx
mov ecx, 0x44bb14
call fcn.00402ce0
push eax
lea ecx, [esp + 0x24]
call fcn.004025e0
test al, al
je 0x404df9
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.00402580
push eax
lea ecx, [esp + 0xac]
call fcn.004036a0
mov edx, dword [0x44bb04]
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 + 0xc0], 0x10
mov eax, dword [esp + 0xac]
jae 0x404b95
lea eax, [esp + 0xac]
push eax
mov ecx, esi
call fcn.00401d20
test eax, eax
je 0x404eaa
cmp dword [esp + 0xdc], 0x10
mov eax, dword [esp + 0xc8]
jae 0x404bbd
lea eax, [esp + 0xc8]
push eax
mov ecx, esi
call fcn.00401d20
cmp eax, 1
jne 0x404cd8
cmp dword [esp + 0xdc], 0x10
mov eax, dword [esp + 0xc8]
jae 0x404be6
lea eax, [esp + 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404cd8
xor esi, esi
jmp 0x404c00
cmp dword [esp + 0xdc], 0x10
mov eax, dword [esp + 0xc8]
jae 0x404c18
lea eax, [esp + 0xc8]
push 0x20
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x404c4c
cmp dword [esp + 0xdc], 0x10
mov eax, dword [esp + 0xc8]
jae 0x404c3d
lea eax, [esp + 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404cd8
push 0x1f4
call edi
add esi, 1
cmp esi, 0x14
jl 0x404c00
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0xdc], 0x10
mov ecx, dword [esp + 0xc8]
jae 0x404c79
lea ecx, [esp + 0xc8]
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.00421e64
mov esi, dword [esp + 0x28]
add esp, 0x10
push 0x10
push str.Silkroad_Online
lea edx, [esp + 0x274]
push edx
mov ecx, esi
call fcn.0040a728
push 7
mov ecx, esi
call fcn.00402500
lea ecx, [esp + 0xa8]
call fcn.004030d0
lea ecx, [esp + 0x150]
mov byte [esp + 0xa04], 0
call fcn.00401b40
jmp 0x405030
mov ecx, dword [esp + 0xc8]
mov eax, 0x10
cmp dword [esp + 0xdc], eax
jae 0x404cf4
lea ecx, [esp + 0xc8]
cmp dword [esp + 0xc0], eax
mov eax, dword [esp + 0xac]
jae 0x404d0b
lea eax, [esp + 0xac]
push ecx
push eax
call ebp
test eax, eax
jne 0x404dbb
xor esi, esi
lea esp, [esp]
mov ecx, dword [esp + 0xc8]
mov eax, 0x10
cmp dword [esp + 0xdc], eax
jae 0x404d3c
lea ecx, [esp + 0xc8]
cmp dword [esp + 0xc0], eax
mov eax, dword [esp + 0xac]
jae 0x404d53
lea eax, [esp + 0xac]
push ecx
push eax
call ebp
test eax, eax
jne 0x404dbb
push 0x1f4
call edi
add esi, 1
cmp esi, 0x14
jl 0x404d20
cmp dword [esp + 0xdc], 0x10
mov esi, dword [esp + 0xc8]
jae 0x404d82
lea esi, [esp + 0xc8]
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.00421e64
add esp, 0x10
push 0x10
push str.Silkroad_Online
lea ecx, [esp + 0x274]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x404cb3
lea ecx, [esp + 0xa8]
mov byte [esp + 0xa04], 1
call fcn.004030d0
lea ecx, [esp + 0x20]
call fcn.004025b0
lea eax, [esp + 0x30]
push eax
mov ecx, 0x44bb14
call fcn.00402ce0
push eax
lea ecx, [esp + 0x24]
call fcn.004025e0
test al, al
jne 0x404b43
cmp dword [esp + 0x1c], 0
je 0x404e0e
lea ecx, [esp + 0x3f0]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0x90]
mov edi, 0x10
cmp dword [esp + 0xa4], edi
jae 0x404e2a
lea eax, [esp + 0x90]
push 0x439cc8
push str.client
push eax
lea edx, [esp + 0x500]
push 0
push edx
call fcn.004222d5
add esp, 0x14
lea eax, [esp + 0x4f4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0xa4], edi
mov eax, dword [esp + 0x90]
jae 0x404e6c
lea eax, [esp + 0x90]
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x1c]
push eax
call fcn.00403980
test eax, eax
jne 0x404ef4
push edi
push str.Silkroad_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 0x405030
cmp dword [esp + 0xc0], 0x10
mov eax, dword [esp + 0xac]
jae 0x404ec2
lea eax, [esp + 0xac]
push eax
lea edx, [esp + 0x5fc]
push str.Update_temp_file___s__is_damaged._Please_try_again.
push edx
call fcn.00421e64
add esp, 0xc
push 0x10
push str.Silkroad_Online
lea eax, [esp + 0x600]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x404caa
cmp dword [esp + 0xa4], edi
mov eax, dword [esp + 0x90]
jae 0x404f0b
lea eax, [esp + 0x90]
mov esi, dword [esp + 0x28]
push esi
push eax
lea edx, [esp + 0x2f4]
push str._s_s
push edx
call fcn.00421e64
add esp, 0x10
lea eax, [esp + 0x2ec]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x404f85
lea ecx, [esp + 0x2ec]
push ecx
lea edx, [esp + 0x5fc]
push str.Launcher__s__file_is_not_exits.
push edx
call fcn.00421e64
add esp, 0xc
push edi
push str.Silkroad_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 0x405030
push 0x40
lea ecx, [esp + 0x50]
push 0
push ecx
call fcn.00420bd0
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 0x404fff
push esi
lea edx, [esp + 0x5fc]
push str.Failed_to_execute_Launcher__s_.
push edx
call fcn.00421e64
add esp, 0xc
push edi
push str.Silkroad_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 0x405030
push 0x10
push str.WARNNING
push str.Abnormal_execute_detected.
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x8c]
call fcn.00402d40
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.0042179f
add esp, 0x9f4
ret 4