Function at 0x413630
Capabilities:
Delete file
Move 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 0x420cf0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x48
mov eax, dword [0x42b014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, 1
lock xadd dword [0x42c054], eax
inc eax
cmp eax, 1
jne 0x413840
mov dword [0x42b028], 0x400000
mov byte [ebp - 0x39], 0
call fcn.00411c60
mov ecx, eax
test ecx, ecx
jne 0x4136aa
push 0x80004005
call fcn.00412060
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x4c], esi
mov dword [ebp - 4], 0
test edi, edi
jne 0x4136fb
lea ecx, [ebp - 0x44]
call fcn.00413210
push eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.00414570
mov byte [ebp - 4], 0
or eax, 0xffffffff
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4136f6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x4c]
mov edi, esi
push edi
push 0x423f00
push 0x104
push 0x42c068
call fcn.00412000
add esp, 0x10
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0x38]
xorps xmm0, xmm0
movups xmmword [ebp - 0x38], xmm0
push eax
push 0
push edi
movups xmmword [ebp - 0x28], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp dword [ebp - 0x1c], 0
ja 0x413741
cmp dword [ebp - 0x18], 0x400000
jb 0x413793
push edi
lea ecx, [ebp - 0x44]
call fcn.00405cb0
push 4
push str..old
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 2
call fcn.00414cb0
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0x44]
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov byte [ebp - 4], 0
or eax, 0xffffffff
mov edx, dword [ebp - 0x44]
mov byte [ebp - 0x39], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x413793
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 0x50], 0
xor eax, eax
mov byte [ebp - 4], 3
cmp byte [ebp - 0x39], al
push 0
sete al
push 0x80
lea eax, [eax*2 + 2]
push eax
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x4137d7
call fcn.00414ef0
test eax, eax
js 0x413821
xor edi, edi
jmp 0x4137d9
mov edi, eax
push 2
lea eax, [ebp - 0x44]
xorps xmm0, xmm0
push eax
push 0
push edi
movlpd qword [ebp - 0x48], xmm0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4137fa
call fcn.00414ef0
cmp byte [0x42c064], 0
mov dword [ebp - 0x54], 0
mov dword [0x42c060], edi
je 0x413821
push str.BEGAIN_n
push 0
push 0
call fcn.00413ab0
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x413840
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
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.0041e4c9
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret