Function at 0x405460
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41cf2b
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x105c
call fcn.0040f470
mov eax, dword [0x426168]
xor eax, esp
mov dword [esp + 0x1058], eax
push ebx
push esi
push edi
mov eax, dword [0x426168]
xor eax, esp
push eax
lea eax, [esp + 0x1070]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor ebx, ebx
push 0x40e
lea eax, [esp + 0x642]
mov esi, ecx
push ebx
push eax
mov dword [esp + 0x24], esi
mov byte [esp + 0x23], 0
mov word [esp + 0x648], bx
call fcn.0040e580
add esp, 0xc
push 0xffffffffffffffff
push edi
lea ecx, [esp + 0x644]
push 0x208
push ecx
call fcn.0040dfc2
add esp, 0x10
lea edx, [esp + 0x63c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov dword [esp + 0x20], eax
lea ecx, [ecx]
cmp dword [esp + 0x20], 0
je 0x405553
cmp byte [esp + 0x17], 0
jne 0x40555e
mov edx, dword [ebx + 0x427544]
mov eax, edx
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405520
sub eax, esi
sar eax, 1
push eax
mov eax, dword [esp + 0x24]
push edx
push eax
call fcn.0040df1e
add esp, 0xc
test eax, eax
jne 0x405547
mov byte [esp + 0x17], 1
mov esi, dword [esp + 0x18]
add ebx, 4
cmp ebx, 8
jb 0x405500
cmp byte [esp + 0x17], 0
je 0x40571f
push 0x616
lea ecx, [esp + 0xa52]
push 0
push ecx
mov word [esp + 0xa58], 0
call fcn.0040e580
add esp, 0xc
push 0xffffffffffffffff
push edi
lea edx, [esp + 0xa54]
push 0x30c
push edx
call fcn.0040dfc2
add esp, 0x10
lea eax, [esp + 0xa4c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
xor ebx, ebx
push 0x616
lea ecx, [esp + 0x2a]
push ebx
push ecx
mov word [esp + 0x30], bx
call fcn.0040e580
mov eax, dword [esi + 0x1c]
add esp, 0xc
push 0xffffffffffffffff
push eax
lea edx, [esp + 0x2c]
push 0x30c
push edx
call fcn.0040dfc2
add esp, 0x10
lea eax, [esp + 0xa4c]
push eax
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
cmp eax, ebx
jne 0x405625
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x405619
and eax, 0xffff
or eax, 0x80070000
mov dword [esi + 0x24], eax
mov byte [esi + 0x20], 1
jmp 0x40571f
mov edx, dword [0x428980]
mov eax, dword [edx + 0xc]
mov ecx, 0x428980
call eax
mov edx, dword [0x428980]
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x428980
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
cmp edi, ebx
mov dword [esp + 0x1078], ebx
jne 0x405662
xor eax, eax
jmp 0x405676
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405667
sub eax, edx
sar eax, 1
push eax
push edi
lea ecx, [esp + 0x20]
call fcn.00402630
lea eax, [esp + 0x24]
lea edx, [eax + 2]
jmp 0x405690
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405690
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x24]
call fcn.00402630
lea ebx, [esi + 0x28]
mov esi, dword [ebx + 4]
mov eax, dword [esi + 4]
lea edx, [esp + 0x18]
push edx
push eax
push esi
call fcn.00407ac0
mov ecx, ebx
mov edi, eax
call fcn.00407b60
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
mov dword [esp + 0x1078], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4056ff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40571f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [esp + 0x1070]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1058]
xor ecx, esp
call fcn.0040d2aa
mov esp, ebp
pop ebp
ret 8