Function at 0x485830
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50c100
mov eax, dword fs:[0]
push eax
sub esp, 0x284
mov eax, dword [0x54b144]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x288], ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x485878
test al, 0x10
jne 0x485889
push esi
call fcn.00487540
add esp, 4
test eax, eax
je 0x48618c
call fcn.004501e0
mov ecx, eax
test ecx, ecx
je 0x4861a8
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x268], eax
push ebx
lea ecx, [ebp - 0x268]
mov dword [ebp - 4], 0
call fcn.0044f2b0
test al, al
jne 0x4858ec
test ebx, ebx
jne 0x4858c5
xor ecx, ecx
jmp 0x4858df
mov ecx, ebx
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4858d0
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x268]
call fcn.0044f440
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax - 0xc]
test ecx, ecx
je 0x485933
lea edx, [ecx - 1]
test edx, edx
js 0x4861bc
cmp edx, ecx
jg 0x4861bc
movzx eax, word [eax + edx*2]
cmp eax, 0x5c
je 0x485933
cmp eax, 0x2f
je 0x485933
push 1
push 0x5329c0
lea ecx, [ebp - 0x268]
call fcn.0048c350
call fcn.004501e0
mov ecx, eax
test ecx, ecx
je 0x4861b2
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x264], eax
push esi
lea ecx, [ebp - 0x264]
mov byte [ebp - 4], 2
call fcn.0044f2b0
test al, al
jne 0x48598d
test esi, esi
jne 0x48596c
xor ecx, ecx
jmp 0x485980
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x485971
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x264]
call fcn.0044f440
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x264]
mov ecx, dword [eax - 0xc]
test ecx, ecx
je 0x4859d1
lea edx, [ecx - 1]
test edx, edx
js 0x4861bc
cmp edx, ecx
jg 0x4861bc
movzx eax, word [eax + edx*2]
cmp eax, 0x5c
je 0x4859d1
cmp eax, 0x2f
je 0x4859d1
push 1
push 0x5329c0
lea ecx, [ebp - 0x264]
call fcn.0048c350
call fcn.004501e0
mov ecx, eax
test ecx, ecx
je 0x4861c6
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x278], edi
mov byte [ebp - 4], 4
call fcn.004501e0
mov ecx, eax
test ecx, ecx
je 0x4861d0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x27c], esi
mov byte [ebp - 4], 5
call fcn.004501e0
mov ecx, eax
test ecx, ecx
je 0x4861da
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x270], eax
push ebx
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 6
call fcn.0044f2b0
test al, al
jne 0x485a6d
test ebx, ebx
jne 0x485a4c
xor ecx, ecx
jmp 0x485a60
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x485a51
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x270]
call fcn.0044f440
push 0x533ad4
lea eax, [ebp - 0x270]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 8
mov ecx, dword [eax]
mov ebx, dword [ebp - 0x270]
add ebx, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x485af4
cmp dword [ebx + 0xc], 0
jl 0x485ae5
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x485ae5
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x280], eax
or ecx, 0xffffffff
lea edx, [ebx + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x485ada
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x280]
add eax, 0x10
mov dword [ebp - 0x270], eax
jmp 0x485af4
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x270]
call fcn.0044f440
mov byte [ebp - 4], 7
or ebx, 0xffffffff
mov edx, dword [ebp - 0x26c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x485b18
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x270]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x280], eax
cmp eax, 0xffffffff
je 0x4860c0
test byte [ebp - 0x260], 0x10
je 0x485c5d
mov edx, 0x53183c
lea ecx, [ebp - 0x234]
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x485b78
test ax, ax
je 0x485b74
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
jne 0x485b78
add ecx, 4
add edx, 4
test ax, ax
jne 0x485b52
xor eax, eax
jmp 0x485b7d
sbb eax, eax
or eax, 1
test eax, eax
je 0x485dd9
mov ecx, 0x531840
lea eax, [ebp - 0x234]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x485bb6
test dx, dx
je 0x485bb2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x485bb6
add eax, 4
add ecx, 4
test dx, dx
jne 0x485b90
xor eax, eax
jmp 0x485bbb
sbb eax, eax
or eax, 1
test eax, eax
je 0x485dd9
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x274]
push eax
call fcn.0048bbf0
mov ebx, eax
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.0048bbf0
mov byte [ebp - 4], 0xa
mov edx, dword [ebx]
mov ecx, dword [eax]
push 0
call fcn.00485830
mov byte [ebp - 4], 9
or ebx, 0xffffffff
mov edx, dword [ebp - 0x26c]
add esp, 0x1c
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x485c33
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
mov eax, ebx
mov edx, dword [ebp - 0x274]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x485dd9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x485dd9
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 0xb
lea ebx, [edi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x485ce2
cmp dword [ebx + 0xc], 0
lea edi, [ebx + 0xc]
jl 0x485ccd
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x485ccd
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x274], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x485cc2
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x274]
lea edi, [eax + 0x10]
mov dword [ebp - 0x278], edi
jmp 0x485ce2
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x278]
call fcn.0044f440
mov edi, dword [ebp - 0x278]
mov byte [ebp - 4], 7
or eax, 0xffffffff
mov edx, dword [ebp - 0x26c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x485d04
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 0xc
lea ebx, [esi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x485d89
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x485d74
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x485d74
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x274], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x485d69
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x274]
lea esi, [eax + 0x10]
mov dword [ebp - 0x27c], esi
jmp 0x485d89
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x27c]
call fcn.0044f440
mov esi, dword [ebp - 0x27c]
mov byte [ebp - 4], 7
or ebx, 0xffffffff
mov edx, dword [ebp - 0x26c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x485dad
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x485dcf
test al, 0x10
jne 0x485dcf
push 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x485dd9
push 5
jmp 0x485dd1
push 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x280]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x4860b4
nop dword [eax]
nop dword [eax + eax]
test byte [ebp - 0x260], 0x10
lea eax, [ebp - 0x234]
je 0x485f23
mov ecx, 0x53183c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x485e3e
test dx, dx
je 0x485e3a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x485e3e
add eax, 4
add ecx, 4
test dx, dx
jne 0x485e18
xor eax, eax
jmp 0x485e43
sbb eax, eax
or eax, 1
test eax, eax
je 0x486099
mov ecx, 0x531840
lea eax, [ebp - 0x234]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x485e7c
test dx, dx
je 0x485e78
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x485e7c
add eax, 4
add ecx, 4
test dx, dx
jne 0x485e56
xor eax, eax
jmp 0x485e81
sbb eax, eax
or eax, 1
test eax, eax
je 0x486099
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.0048bbf0
mov ebx, eax
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x274]
push eax
call fcn.0048bbf0
mov byte [ebp - 4], 0xe
mov edx, dword [ebx]
mov ecx, dword [eax]
push 0
call fcn.00485830
mov byte [ebp - 4], 0xd
or ebx, 0xffffffff
mov edx, dword [ebp - 0x274]
add esp, 0x1c
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x485ef9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
mov eax, ebx
mov edx, dword [ebp - 0x26c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x486099
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x486099
push eax
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x28c]
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 0xf
lea ebx, [edi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x485fa2
cmp dword [ebx + 0xc], 0
lea edi, [ebx + 0xc]
jl 0x485f8d
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x485f8d
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x284], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x485f82
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x284]
lea edi, [eax + 0x10]
mov dword [ebp - 0x278], edi
jmp 0x485fa2
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x278]
call fcn.0044f440
mov edi, dword [ebp - 0x278]
mov byte [ebp - 4], 7
or eax, 0xffffffff
mov edx, dword [ebp - 0x28c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x485fc4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x290]
push eax
call fcn.0048bbf0
add esp, 0xc
mov byte [ebp - 4], 0x10
lea ebx, [esi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x486049
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x486034
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x486034
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x284], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x486029
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x284]
lea esi, [eax + 0x10]
mov dword [ebp - 0x27c], esi
jmp 0x486049
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x27c]
call fcn.0044f440
mov esi, dword [ebp - 0x27c]
mov byte [ebp - 4], 7
or ebx, 0xffffffff
mov edx, dword [ebp - 0x290]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x48606d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x48608f
test al, 0x10
jne 0x48608f
push 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x486099
push 5
jmp 0x486091
push 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x280]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x485e00
push dword [ebp - 0x280]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x288]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4860ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
jne 0x4860ed
push 4
push 0
push dword [ebp - 0x288]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov byte [ebp - 4], 5
mov eax, ebx
mov edx, dword [ebp - 0x270]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x48610e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x486129
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x486144
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x264]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x486165
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x268]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x486187
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004dafe6
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00450130
push 0x80004005
call fcn.00450130
push 0x80070057
call fcn.00450130
push 0x80004005
call fcn.00450130
push 0x80004005
call fcn.00450130
push 0x80004005
call fcn.00450130
int3