Function at 0x100599b0
Capabilities:
Delete directory
Enumerate files on windows
Get disk information
Get file attributes
Set file attributes

Disassembly:
mov eax, 0x12fec
call fcn.102244a0
mov eax, dword [esp + 0x12ff8]
cmp eax, 0x1c58
je 0x100599cf
cmp eax, 0x1c60
jne 0x100599ff
mov ecx, dword [esp + 0x12ffc]
mov edx, dword [esp + 0x12ff0]
push 0
push 0
push eax
mov eax, dword [esp + 0x13000]
push eax
mov eax, dword [0x107ab964]
push ecx
push edx
push eax
push 0x10227334
call fcn.10029df0
add esp, 0x20
push ebx
push ebp
push esi
push edi
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x1ffc]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1ffc]
push ecx
push 0x800
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cdq
and edx, 3
add eax, edx
mov ebp, eax
sar ebp, 2
cmp ebp, 0xa
mov dword [esp + 0x28], ebp
jg 0x1005a022
test ebp, ebp
jle 0x1005a022
mov ebx, dword [sym.imp.MSVCRT.dll_wcscpy]
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x17fc]
rep stosd dword es:[edi], eax
mov ecx, 0x200
lea edi, [esp + 0x27fc]
lea edx, [esp + 0x17fc]
push str.USB_DRIVE
rep stosd dword es:[edi], eax
push edx
call ebx
lea eax, [esp + 0x2804]
push str.ROOT_DRIVE
push eax
call ebx
push 0
push 0
push 0
push 0
push 0x7fff
call sub.platform.dll_Ordinal_24
mov esi, eax
xor eax, eax
add esp, 0x24
cmp esi, eax
jne 0x10059ab0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12fec
ret
cmp ebp, eax
mov dword [esp + 0x20], eax
jle 0x1005a006
lea ecx, [esp + 0x1ffc]
mov dword [esp + 0x1c], ecx
jmp 0x10059acd
mov eax, dword [esp + 0x18]
cmp eax, 0x20
jge 0x1005a006
mov ecx, 0x4000
xor eax, eax
lea edi, [esp + 0x2ffc]
mov edx, dword [esp + 0x1c]
rep stosd dword es:[edi], eax
mov ecx, 0x20
lea edi, [esp + 0xac]
rep stosd dword es:[edi], eax
mov ecx, 0x200
lea edi, [esp + 0xbfc]
rep stosd dword es:[edi], eax
push 4
lea eax, [esp + 0xc00]
push edx
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.MSVCRT.dll_wcsncpy]
mov ecx, 0x1fff
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0xc08]
push ecx
push esi
stosb byte es:[edi], al
call ebx
mov ebp, dword [sym.imp.MSVCRT.dll_wcscat]
push 0x1023256c
push esi
call ebp
lea edx, [esp + 0x1818]
push edx
push esi
call ebp
mov ecx, dword [0x107ab964]
add esp, 0x24
mov eax, dword [ecx]
push 0
push esi
call dword [eax + 0x64]
cmp eax, 0xffffffff
jne 0x10059bad
mov ecx, 0x1fff
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0xbfc]
push ecx
push esi
stosb byte es:[edi], al
call ebx
push 0x1023256c
push esi
call ebp
lea edx, [esp + 0x280c]
push edx
push esi
call ebp
mov ecx, dword [0x107ab964]
add esp, 0x18
mov eax, dword [ecx]
push 0
push esi
call dword [eax + 0x64]
cmp eax, 0xffffffff
je 0x10059fb8
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x3fc]
rep stosd dword es:[edi], eax
mov ecx, 0x1fff
mov edi, esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0xbfc]
push ecx
push esi
stosb byte es:[edi], al
call ebx
push 0x10265fbc
push esi
call ebp
add esp, 0x10
lea edx, [esp + 0x1ac]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x10059d58
lea eax, [esp + 0xac]
lea ebx, [esp + 0x2ffc]
mov dword [esp + 0x14], eax
cmp dword [esp + 0x18], 0x20
jge 0x10059d47
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x3fc]
lea edx, [esp + 0x3fc]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.MSVCRT.dll_wcscpy]
lea ecx, [esp + 0xbfc]
push ecx
push edx
call edi
lea eax, [esp + 0x1e0]
lea ecx, [esp + 0x404]
push eax
push ecx
call ebp
add esp, 0x10
lea edx, [esp + 0x3fc]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, dword [esp + 0x1c8]
test ecx, ecx
jne 0x10059cfa
mov ecx, dword [esp + 0x1cc]
cmp ecx, 0x2800000
jb 0x10059cfa
cmp ecx, 0x5000000
ja 0x10059cfa
mov ecx, eax
and ecx, 1
cmp cl, 1
jne 0x10059d2b
mov edx, eax
and edx, 2
cmp dl, 2
jne 0x10059d2b
and eax, 4
cmp al, 4
jne 0x10059d2b
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x13fc]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x3fc]
lea ecx, [esp + 0x13fc]
push eax
push ecx
call fcn.1000f4d0
push 0
lea edx, [esp + 0x1408]
push 0
push edx
call fcn.10028810
mov ecx, dword [0x107ab964]
add esp, 0x14
lea edx, [esp + 0x3fc]
mov eax, dword [ecx]
push edx
call dword [eax + 0x70]
jmp 0x10059d2b
lea eax, [esp + 0x3fc]
push eax
push ebx
call edi
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x1d4]
mov edi, dword [esp + 0x20]
add esp, 8
mov dword [eax], ecx
inc edi
add ebx, 0x800
add eax, 4
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1ac]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, 1
je 0x10059c0d
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [sym.imp.MSVCRT.dll_wcscpy]
mov ecx, 0x1fff
xor eax, eax
mov edi, esi
push 0x10265fb0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
stosb byte es:[edi], al
call ebx
lea edx, [esp + 0xc04]
push 2
lea eax, [esi + 8]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0x14
xor ebx, ebx
mov edi, dword [sym.imp.MSVCRT.dll_wcslen]
push esi
call edi
add eax, 0xc
add esp, 4
cmp eax, 0x7fff
ja 0x10059ff0
push 0x1023256c
push esi
call ebp
lea ecx, [esp + 0x1804]
push ecx
push esi
call ebp
mov ecx, dword [0x107ab964]
add esp, 0x10
mov edx, dword [ecx]
push 0
push esi
call dword [edx + 0x64]
test eax, eax
je 0x10059df3
push esi
call edi
mov word [esi + eax*2 - 0x12], 0
lea eax, [esp + 0x2800]
push eax
push esi
call ebp
mov ecx, dword [0x107ab964]
add esp, 0xc
mov edx, dword [ecx]
push 0
push esi
call dword [edx + 0x64]
test eax, eax
jne 0x10059e1f
test ebx, ebx
jne 0x10059e19
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x3fc]
push esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x400]
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
inc ebx
jmp 0x10059d87
push esi
call edi
add esp, 4
cmp word [esi + eax*2 - 0x16], 0x5c
jne 0x10059e3a
push esi
call edi
add esp, 4
mov word [esi + eax*2 - 0x16], 0
mov ebx, dword [esp + 0x18]
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov ecx, 0x20
lea edi, [esp + 0x12c]
test ebx, ebx
rep stosd dword es:[edi], eax
mov dword [esp + 0x14], eax
jle 0x10059eb3
lea edi, [esp + 0xac]
mov dword [esp + 0x10], ebx
xor eax, eax
lea ecx, [esp + 0x2c]
cmp eax, dword [esp + 0x14]
jge 0x10059e8b
mov edx, dword [ecx]
cmp edx, dword [edi]
je 0x10059fda
inc eax
add ecx, 4
cmp eax, 0x20
jl 0x10059e72
mov eax, dword [esp + 0x14]
mov ecx, dword [edi]
mov dword [esp + eax*4 + 0x12c], 1
mov dword [esp + eax*4 + 0x2c], ecx
inc eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
add edi, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x10059e6c
mov ecx, dword [esp + 0x14]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x10], eax
jle 0x10059f27
cmp eax, 0x20
jge 0x10059f27
cmp dword [esp + eax*4 + 0x12c], 3
jb 0x10059f1a
test ebx, ebx
jle 0x10059f1a
mov edx, dword [esp + eax*4 + 0x2c]
lea ebp, [esp + 0x2ffc]
mov dword [esp + 0x24], edx
lea edi, [esp + 0xac]
mov ecx, dword [esp + 0x24]
mov edx, dword [edi]
cmp ecx, edx
jne 0x10059f04
mov ecx, dword [0x107ab964]
push ebp
mov edx, dword [ecx]
call dword [edx + 0x70]
mov eax, dword [esp + 0x10]
add edi, 4
add ebp, 0x800
dec ebx
jne 0x10059eea
mov ebp, dword [sym.imp.MSVCRT.dll_wcscat]
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x10059ec1
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x80
push esi
call edi
lea eax, [esp + 0xbfc]
push eax
push esi
call fcn.1005a040
add esp, 8
cmp eax, 1
jne 0x10059f68
lea ecx, [esp + 0x3fc]
push 0x80
push ecx
call edi
lea edx, [esp + 0x3fc]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea eax, [esp + 0x3fc]
push 0x10265fa4
push eax
call ebp
mov ecx, dword [0x107ab964]
add esp, 8
lea eax, [esp + 0x3fc]
mov edx, dword [ecx]
push eax
call dword [edx + 0x70]
lea ecx, [esp + 0xbfc]
push str.autorun.inf
push ecx
call ebp
mov ecx, dword [0x107ab964]
add esp, 8
lea eax, [esp + 0xbfc]
mov edx, dword [ecx]
push eax
call dword [edx + 0x70]
mov ebx, dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
inc eax
add edx, 8
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edx
jl 0x10059ac9
jmp 0x1005a006
mov ecx, dword [esp + eax*4 + 0x12c]
lea eax, [esp + eax*4 + 0x12c]
inc ecx
mov dword [eax], ecx
jmp 0x10059ea5
push esi
call sub.platform.dll_Ordinal_27
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12fec
ret
push esi
call sub.platform.dll_Ordinal_27
mov ecx, dword [0x107ab964]
mov eax, dword [esp + 0x13004]
add esp, 4
mov edx, dword [ecx]
push eax
call dword [edx + 0x3c]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x12fec
ret