Function at 0x470140
Capabilities:
Delete directory
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57d482
mov eax, dword fs:[0]
push eax
sub esp, 0x280
mov eax, dword [0x5fb61c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x26c], edi
push eax
lea ecx, [ebp - 0x264]
mov dword [ebp - 4], edi
call fcn.00422540
push 0x592378
lea eax, [ebp - 0x264]
push eax
lea ecx, [ebp - 0x270]
push ecx
mov byte [ebp - 4], 1
call fcn.004221d0
mov eax, dword [eax]
add esp, 0xc
lea edx, [ebp - 0x260]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
test eax, eax
je 0x4701cc
mov dword [ebp - 0x26c], eax
mov edi, eax
mov eax, dword [ebp - 0x270]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4701ee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, 0xffffffff
jmp 0x470573
test byte [ebp - 0x260], 0x10
je 0x4702d7
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push 0x592320
lea ecx, [ebp - 0x234]
push ecx
call esi
test eax, eax
je 0x470563
push 0x59185c
lea edx, [ebp - 0x234]
push edx
call esi
test eax, eax
je 0x470563
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x264]
push ecx
lea edx, [ebp - 0x28c]
push edx
call fcn.004221d0
push 0x592324
push eax
lea eax, [ebp - 0x278]
push eax
mov byte [ebp - 4], 2
call fcn.004221d0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [eax]
push ecx
push edx
push eax
mov byte [ebp - 4], 3
call fcn.00470140
mov esi, eax
mov eax, dword [ebp - 0x278]
add eax, 0xfffffff0
add esp, 0x24
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4702a4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4702ca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x470583
jmp 0x470563
cmp dword [ebp + 0xc], 0
je 0x4703ac
lea eax, [ebp - 0x234]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4702f0
sub eax, edx
sar eax, 1
cmp eax, 4
jle 0x4703ac
lea ecx, [ebp + eax*2 - 0x23c]
push str..sys
push ecx
call fcn.005347c1
add esp, 8
test eax, eax
jne 0x4703ac
lea edx, [ebp - 0x274]
push edx
call fcn.0046f360
add esp, 4
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 4
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x470341
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x274]
call fcn.00422060
mov esi, dword [ebp - 0x274]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x47038c
cmp dword [ebp + 0x10], eax
je 0x47038c
push 4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4703ac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x234]
push ecx
lea edx, [ebp - 0x264]
push edx
lea eax, [ebp - 0x280]
push eax
call fcn.004221d0
mov eax, dword [eax]
add esp, 0xc
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x280]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4703f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x234]
push ecx
lea edx, [ebp - 0x264]
push edx
lea eax, [ebp - 0x288]
push eax
call fcn.004221d0
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
mov eax, dword [ebp - 0x288]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x470440
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
jne 0x470563
mov edx, dword [0x5fcb00]
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcb00
call eax
add eax, 0x10
mov dword [ebp - 0x270], eax
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [ebp - 0x264]
push eax
lea ecx, [ebp - 0x234]
push ecx
push edx
lea eax, [ebp - 0x270]
push str._s_s_d__x
push eax
call fcn.004237a0
lea ecx, [ebp - 0x234]
push ecx
lea edx, [ebp - 0x264]
push edx
lea eax, [ebp - 0x27c]
push eax
call fcn.004221d0
mov edi, dword [ebp - 0x270]
mov eax, dword [eax]
push edi
push eax
call fcn.00535269
mov esi, eax
mov eax, dword [ebp - 0x27c]
add eax, 0xfffffff0
add esp, 0x28
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4704db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
jne 0x4704eb
push 4
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x47053d
cmp dword [ebp + 0x10], 0
je 0x47053d
lea ecx, [ebp - 0x234]
push ecx
lea edx, [ebp - 0x264]
push edx
lea eax, [ebp - 0x284]
push eax
call fcn.004221d0
mov eax, dword [eax]
add esp, 0xc
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [ebp - 0x284]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47053d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47055d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x26c]
lea ecx, [ebp - 0x260]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4701f6
mov dword [ebp - 0x268], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x264]
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4705b6
cmp esi, 2
je 0x4705b6
cmp esi, 3
je 0x4705b6
push 4
push eax
mov eax, dword [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [ebp - 0x264]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4705dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x4705ec
cmp edi, 0xffffffff
je 0x4705ec
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x268]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005332ca
mov esp, ebp
pop ebp
ret