Function at 0x416520
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get common file path
Move file

Disassembly:
push 0xffffffffffffffff
push 0x50f712
mov eax, dword fs:[0]
push eax
sub esp, 0x2a0
mov eax, dword [0x53a1a4]
xor eax, esp
mov dword [esp + 0x298], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x53a1a4]
xor eax, esp
push eax
lea eax, [esp + 0x2b4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2c4]
mov ebp, dword [esp + 0x2c8]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2d4]
mov dword [esp + 0x54], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
test eax, eax
jne 0x4165a3
mov cl, byte [0x54634c]
mov dl, byte [0x54634d]
mov byte [esp + 0x1a], cl
mov byte [esp + 0x1b], dl
jmp 0x4166b6
cmp eax, 1
jne 0x4166b6
mov ecx, dword [0x5467a0]
mov esi, dword [0x54679c]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
xor edi, edi
add eax, edx
je 0x416631
xor ebx, ebx
cmp edi, eax
jb 0x4165e2
call fcn.004ea2c7
mov esi, dword [0x54679c]
cmp dword [ebx + esi + 0x18], 8
jb 0x4165ef
mov esi, dword [ebx + esi + 4]
jmp 0x4165f3
lea esi, [ebx + esi + 4]
push esi
push ebp
call fcn.004ebf9c
add esp, 8
test eax, eax
je 0x41662c
mov ecx, dword [0x5467a0]
mov esi, dword [0x54679c]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
add ebx, 0x1c
cmp edi, eax
jb 0x4165e2
jmp 0x416631
mov byte [esp + 0x1a], 1
mov ecx, dword [0x5467b8]
mov esi, dword [0x5467b4]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
xor edi, edi
add eax, edx
je 0x4166b6
xor ebx, ebx
cmp edi, eax
jb 0x416667
call fcn.004ea2c7
mov esi, dword [0x5467b4]
cmp dword [ebx + esi + 0x18], 8
jb 0x416674
mov esi, dword [ebx + esi + 4]
jmp 0x416678
lea esi, [ebx + esi + 4]
push esi
push ebp
call fcn.004ebf9c
add esp, 8
test eax, eax
je 0x4166b1
mov ecx, dword [0x5467b8]
mov esi, dword [0x5467b4]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
add ebx, 0x1c
cmp edi, eax
jb 0x416667
jmp 0x4166b6
mov byte [esp + 0x1b], 1
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x1c]
push eax
call fcn.00406c40
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x5c]
push edx
mov ebx, 0x51ed38
mov dword [esp + 0x2c4], 0
call fcn.00417ae0
mov eax, dword [eax]
add esp, 8
lea ecx, [esp + 0x5c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov eax, dword [esp + 0x58]
add eax, 0xfffffff0
mov dword [esp + 0x30], esi
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41671a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, 0xffffffff
jne 0x416729
mov esi, 1
jmp 0x416993
mov ebp, dword [sym.imp.KERNEL32.dll_MoveFileExW]
test byte [esp + 0x5c], 0x10
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
je 0x4169f3
push 0x51ed3c
lea ecx, [esp + 0x8c]
push ecx
call esi
test eax, eax
je 0x416de5
push 0x51ed40
lea edx, [esp + 0x8c]
push edx
call esi
test eax, eax
je 0x416de5
mov esi, 0x54294c
lea esp, [esp]
mov eax, dword [esi]
push eax
lea ecx, [esp + 0x8c]
push ecx
call fcn.004ebf9c
add esp, 8
test eax, eax
je 0x416de5
add esi, 4
cmp esi, 0x54295c
jl 0x416780
cmp byte [esp + 0x1b], 0
je 0x4167c5
lea edx, [esp + 0x88]
push edx
call fcn.00415fc0
add esp, 4
test eax, eax
jne 0x416de5
cmp byte [esp + 0x1a], 0
je 0x4167e4
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x88]
call fcn.00416060
test eax, eax
jne 0x416de5
mov ecx, dword [0x546770]
mov edi, dword [0x54676c]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
xor ebx, ebx
add eax, edx
je 0x4168c8
xor esi, esi
cmp ebx, eax
jb 0x41681e
call fcn.004ea2c7
mov edi, dword [0x54676c]
cmp dword [esi + edi + 0x34], 8
jb 0x41682b
mov edi, dword [esi + edi + 0x20]
jmp 0x41682f
lea edi, [esi + edi + 0x20]
lea eax, [esp + 0x88]
push edi
push eax
call fcn.004ebf9c
add esp, 8
test eax, eax
jne 0x41689b
mov ecx, dword [0x546770]
mov edi, dword [0x54676c]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ebx, ecx
jb 0x416874
call fcn.004ea2c7
mov edi, dword [0x54676c]
cmp dword [esi + edi + 0x18], 8
jb 0x416881
mov edi, dword [esi + edi + 4]
jmp 0x416885
lea edi, [esi + edi + 4]
mov edx, dword [esp + 0x24]
push edi
push edx
call fcn.004ebf9c
add esp, 8
test eax, eax
je 0x416de5
mov ecx, dword [0x546770]
mov edi, dword [0x54676c]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
inc ebx
add eax, edx
add esi, 0x38
cmp ebx, eax
jb 0x41681e
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x44]
push ecx
lea ebx, [esp + 0x90]
call fcn.00417ae0
push eax
lea edx, [esp + 0x40]
push edx
mov ebx, 0x51ed48
mov byte [esp + 0x2cc], 1
call fcn.00417ae0
mov ecx, dword [esp + 0x2e4]
mov edx, dword [esp + 0x2e0]
inc ecx
push ecx
mov ecx, dword [esp + 0x2e0]
push edx
push ecx
lea edx, [esp + 0xa4]
mov byte [esp + 0x2d8], 2
mov eax, dword [eax]
push edx
push eax
call fcn.00416520
mov esi, eax
mov byte [esp + 0x2e0], 1
mov eax, dword [esp + 0x58]
add eax, 0xfffffff0
add esp, 0x24
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416954
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x2bc], 0
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41697c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
jne 0x416de5
mov esi, dword [esp + 0x54]
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov dword [esp + 0x2bc], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4169c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x2b4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.004ea10a
add esp, 0x2ac
ret
mov esi, 0x54295c
jmp 0x416a00
mov ecx, dword [esi]
push ecx
lea edx, [esp + 0x8c]
push edx
call fcn.004ebf9c
add esp, 8
test eax, eax
je 0x416de5
add esi, 4
cmp esi, 0x542964
jl 0x416a00
cmp dword [esp + 0x2cc], 0
je 0x416af9
lea eax, [esp + 0x88]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x416a40
sub eax, edx
sar eax, 1
cmp eax, 4
jle 0x416af9
lea eax, [esp + eax*2 + 0x80]
push 0x51ed4c
push eax
call fcn.004ebf9c
add esp, 8
test eax, eax
jne 0x416af9
lea esi, [esp + 0x28]
call fcn.004172d0
lea eax, [esp + 0x88]
mov byte [esp + 0x2bc], 3
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x416a90
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x8c]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00418990
mov esi, dword [esp + 0x28]
push 0
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x416ad5
cmp dword [esp + 0x2d0], eax
je 0x416ad5
push 4
push eax
push esi
call ebp
lea eax, [esi - 0x10]
mov byte [esp + 0x2bc], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416af9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x54]
push edx
lea ebx, [esp + 0x90]
call fcn.00417ae0
mov eax, dword [eax]
add esp, 8
push 0
push eax
call edi
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416b39
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x4c]
push edx
lea ebx, [esp + 0x90]
call fcn.00417ae0
mov eax, dword [eax]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416b7d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
jne 0x416de5
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x8c]
call fcn.00406c40
lea edx, [esp + 0x2c]
push edx
lea eax, [esi + 4]
lea ecx, [esp + 0x3c]
mov byte [esp + 0x2c0], 4
call fcn.00417a00
mov eax, dword [eax]
mov ecx, 0x51ed58
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x416bdc
test dx, dx
je 0x416bd8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x416bdc
add eax, 4
add ecx, 4
test dx, dx
jne 0x416bb6
xor eax, eax
jmp 0x416be1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, dword [esp + 0x38]
setne bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416c06
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x416d7b
mov edx, dword [0x544fac]
mov eax, dword [edx + 0xc]
mov ecx, 0x544fac
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x20], esi
mov byte [esp + 0x2bc], 5
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x105
or eax, ecx
jge 0x416c53
mov ecx, 0x105
lea eax, [esp + 0x20]
call fcn.00407610
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push esi
push 0
push 0x51ed64
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov edi, eax
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004ec08d
add esp, 8
test eax, eax
jl 0x416e05
cmp eax, dword [esi - 8]
jg 0x416e05
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
test edi, edi
jne 0x416cb7
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x88]
push eax
push ecx
push str._s_s.tmp
lea edi, [esp + 0x2c]
call fcn.00418bf0
mov esi, dword [esp + 0x2c]
add esp, 0xc
jmp 0x416cbe
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x40]
push eax
lea ebx, [esp + 0x90]
call fcn.00417ae0
mov eax, dword [eax]
push esi
push eax
call fcn.004ec0ac
mov edi, eax
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416d02
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
jne 0x416d1c
push 4
push edi
push esi
call ebp
mov byte [esp + 0x2bc], 4
lea eax, [esi - 0x10]
jmp 0x416da4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0x2d0], 0
je 0x416d6e
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x48]
push edx
lea ebx, [esp + 0x90]
call fcn.00417ae0
mov eax, dword [eax]
add esp, 8
push 4
push 0
push eax
call ebp
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416d6e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x2bc], 4
lea eax, [esi - 0x10]
jmp 0x416da4
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x50]
push edx
lea ebx, [esp + 0x90]
call fcn.00417ae0
mov eax, dword [eax]
add esp, 8
push 4
push 0
push eax
call ebp
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416dbd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x2bc], 0
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416de5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x5c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x41672f
lea esi, [eax + 1]
jmp 0x416988
push 0x80070057
call fcn.004029f0
int3