Function at 0x405090
Capabilities:
Delete file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x453639
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xa8
mov eax, dword [0x46f020]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xorps xmm0, xmm0
lea ecx, [ebp - 0x30]
movups xmmword [0x46fb84], xmm0
movups xmmword [0x46fb94], xmm0
movups xmmword [0x46fba4], xmm0
call fcn.00403a10
push dword [ebp - 0xa8]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2c]
cmp dword [ebp - 0x18], 0x10
mov edx, dword [ebp - 0x1c]
cmovae ecx, dword [ebp - 0x2c]
push 2
push 0x46ba4c
push ecx
call fcn.00404420
add esp, 0x10
lea ecx, [ebp - 0x30]
push eax
push 0
lea eax, [ebp - 0x4c]
push eax
call fcn.00401eb0
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
call fcn.00401f90
cmp dword [ebp - 0x34], 0x10
lea eax, [ebp - 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmovae eax, dword [ebp - 0x48]
mov dword [ebp - 0xa8], eax
mov eax, dword fs:[0x2c]
mov edi, dword [eax]
mov eax, dword [0x471184]
cmp eax, dword [edi + 4]
jle 0x4051ad
push 0x471184
call fcn.0040c420
add esp, 4
cmp dword [0x471184], 0xffffffff
jne 0x4051ad
push 0
push 0
push 0
mov dword [0x471180], 0
call esi
push 0x453de0
mov dword [0x47117c], eax
call fcn.0040ca60
add esp, 4
push 0x471184
call fcn.0040c3d0
add esp, 4
push dword [ebp - 0xa8]
push str._s_trose.exe
call fcn.00404890
push eax
push 0x46b30c
push 0x47117c
call fcn.00402b00
add esp, 0x14
lea ecx, [ebp - 0x4c]
call fcn.00401f90
lea ecx, [ebp - 0x4c]
call fcn.00403a10
push dword [ebp - 0xa8]
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x48]
cmp dword [ebp - 0x34], 0x10
mov edx, dword [ebp - 0x38]
cmovae ecx, dword [ebp - 0x48]
push 2
push 0x46ba4c
push ecx
call fcn.00404420
add esp, 0x10
lea ecx, [ebp - 0x4c]
push eax
push 0
lea eax, [ebp - 0x84]
push eax
call fcn.00401eb0
lea ecx, [ebp - 0x4c]
call fcn.00401f90
mov dword [ebp - 4], 2
lea eax, [ebp - 0x80]
cmp dword [ebp - 0x6c], 0x10
cmovae eax, dword [ebp - 0x80]
push eax
push str._s_trose.exe
call fcn.00404890
mov dword [ebp - 0xa8], eax
lea eax, [ebp - 0xa1]
push 8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xb0], eax
call fcn.00402460
lea ecx, [ebp - 0x30]
mov dword [ebp - 0xb4], eax
add esp, 0xc
mov dword [eax], ecx
mov dword [eax + 4], 0
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0xa8]
mov ecx, edx
mov byte [ebp - 4], 3
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
lea eax, [ecx + 1]
mov byte [ebp - 0x2c], 0
mov dword [ebp - 0xa8], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4052b6
sub ecx, dword [ebp - 0xa8]
push ecx
push edx
lea ecx, [ebp - 0x30]
call fcn.00402230
mov byte [ebp - 4], 4
mov eax, dword [0x471184]
cmp eax, dword [edi + 4]
jle 0x405325
push 0x471184
call fcn.0040c420
add esp, 4
cmp dword [0x471184], 0xffffffff
jne 0x405325
push 0
push 0
push 0
mov dword [0x471180], 0
call esi
push 0x453de0
mov dword [0x47117c], eax
call fcn.0040ca60
add esp, 4
push 0x471184
call fcn.0040c3d0
add esp, 4
lea eax, [ebp - 0x30]
push eax
call fcn.00404c30
movzx eax, al
push eax
push str.IsRunning:__d
push 0x47117c
call fcn.00402b00
add esp, 0xc
lea ecx, [ebp - 0x30]
call fcn.00401f90
lea ecx, [ebp - 0x84]
mov dword [ebp - 4], 0xffffffff
call fcn.00401f90
lea ecx, [ebp - 0x4c]
call fcn.00403a10
push dword [ebp - 0xa8]
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x48]
cmp dword [ebp - 0x34], 0x10
mov edx, dword [ebp - 0x38]
cmovae ecx, dword [ebp - 0x48]
push 2
push 0x46ba4c
push ecx
call fcn.00404420
add esp, 0x10
lea ecx, [ebp - 0x4c]
push eax
push 0
lea eax, [ebp - 0xa0]
push eax
call fcn.00401eb0
lea ecx, [ebp - 0x4c]
call fcn.00401f90
mov dword [ebp - 4], 6
lea eax, [ebp - 0x9c]
cmp dword [ebp - 0x88], 0x10
cmovae eax, dword [ebp - 0x9c]
push eax
push str._s_trose.exe
call fcn.00404890
mov esi, eax
mov dword [ebp - 0x68], 0
lea eax, [ebp - 0xa9]
mov dword [ebp - 0x64], 0
push 8
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0xb0], eax
call fcn.00402460
lea ecx, [ebp - 0x68]
mov dword [ebp - 0xb4], eax
add esp, 0xc
mov dword [eax], ecx
mov dword [eax + 4], 0
mov dword [ebp - 0x68], eax
mov ecx, esi
mov byte [ebp - 4], 7
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0xf
mov byte [ebp - 0x64], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405435
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x68]
call fcn.00402230
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 8
push eax
call fcn.00404c30
lea ecx, [ebp - 0x68]
mov byte [ebp - 0xa1], al
call fcn.00401f90
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 0xffffffff
call fcn.00401f90
cmp byte [ebp - 0xa1], 0
jne 0x4054d5
cmp byte [0x46fb80], 0
je 0x4054a4
mov ecx, 0x46fad8
call fcn.004081f0
mov word [0x46fb80], 0
mov dword [0x46fb7c], 0
push str.data.idx
mov ecx, 0x46fad8
call fcn.00408640
test al, al
je 0x4054fc
mov eax, dword [0x46fb1c]
mov ecx, 4
cmp eax, 0x1e
mov byte [0x46fb80], 1
cmovae eax, ecx
mov dword [0x46fb7c], eax
jmp 0x4054fc
mov ecx, str.GAME_RUNNING
call fcn.00402c30
push eax
push 0x400
push 0x476748
call fcn.00404970
add esp, 0xc
mov dword [0x476bb0], 1
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str.old_launcher.bak
call esi
push str.patch.hpl
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040c1e0
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret