Function at 0x10016390
Capabilities:
Create process on windows
Set file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
push ebx
push esi
push edi
cmp dword [ebp + 8], 0
je 0x100163b2
mov eax, dword [ebp + 8]
cmp dword [eax], 0
je 0x100163b2
mov ecx, dword [ebp + 8]
cmp dword [ecx], 0xffffffff
jne 0x100163c1
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10016b78
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp dword [ecx], 0x3dc0
je 0x100163e3
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10016b78
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call sym.pdapi.dll_DeleteDiskShares
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x1ac]
and edx, 0x80
test edx, edx
jne 0x1001690e
mov eax, dword [ebp - 4]
add eax, 0x2eb0
mov dword [ebp - 0x5c], eax
mov cl, byte [0x100273cc]
mov byte [ebp - 0x160], cl
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x15f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x164], 0
mov edx, dword [ebp - 0x5c]
movsx eax, byte [edx]
test eax, eax
je 0x1001690e
mov cl, byte [0x100273cc]
mov byte [ebp - 0x268], cl
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x267]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
push 0
lea edx, [ebp - 0x268]
push edx
call fcn.1001ea50
add esp, 0xc
push 0x104
push 0
lea eax, [ebp - 0x160]
push eax
call fcn.1001ea50
add esp, 0xc
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x19c]
add edx, 0x41
mov eax, dword [ebp - 0x5c]
mov byte [eax], dl
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.1000de50
add esp, 4
test eax, eax
je 0x100164d7
mov edx, dword [ebp - 0x5c]
push edx
lea eax, [ebp - 0x160]
push eax
call fcn.1001e290
add esp, 8
lea ecx, [ebp - 0x160]
push ecx
call fcn.1000de50
add esp, 4
mov byte [eax + 1], 0
mov edx, dword [ebp - 0x5c]
push edx
push str.__s_
lea eax, [ebp - 0x268]
push eax
call fcn.1001e7d5
add esp, 0xc
push 0x44
push 0
lea ecx, [ebp - 0x48]
push ecx
call fcn.1001ea50
add esp, 0xc
push 0x10
push 0
lea edx, [ebp - 0x58]
push edx
call fcn.1001ea50
add esp, 0xc
mov dword [ebp - 0x48], 0x44
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x48]
push ecx
movsx edx, byte [ebp - 0x160]
neg edx
sbb edx, edx
lea eax, [ebp - 0x160]
and edx, eax
push edx
push 0
push 0x20
push 0
push 0
push 0
lea ecx, [ebp - 0x268]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x10016684
mov dword [ebp - 0x26c], 0
lea edx, [ebp - 0x160]
push edx
lea eax, [ebp - 0x268]
push eax
mov ecx, dword [ebp - 0x58]
push ecx
mov edx, dword [ebp - 0x54]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DismountDisk._1.__08X.__08X.__08X.__s.__s.
push 0x100273cc
push 3
call fcn.1000eed0
add esp, 0x20
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x2710
mov eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x10016644
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x274], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DismountDisk._2.__08X.
push 0x100273cc
push 1
call fcn.1000eed0
add esp, 0x10
mov ecx, dword [ebp - 0x50]
push ecx
call fcn.100153a0
add esp, 4
mov dword [ebp - 0x274], eax
cmp dword [ebp - 0x274], 0
je 0x1001662e
lea edx, [ebp - 0x270]
push edx
mov eax, dword [ebp - 0x274]
push eax
call fcn.100153d0
add esp, 8
test eax, eax
je 0x1001662e
cmp dword [ebp - 0x270], 0
jne 0x1001662e
cmp dword [ebp - 0x26c], 6
jb 0x10016630
jmp 0x10016644
mov ecx, dword [ebp - 0x26c]
add ecx, 1
mov dword [ebp - 0x26c], ecx
jmp 0x1001659e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DismountDisk._3.__08X.
push 0x100273cc
push 3
call fcn.1000eed0
add esp, 0x10
cmp dword [ebp - 0x54], 0
je 0x1001666f
mov edx, dword [ebp - 0x54]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x58], 0
je 0x1001667f
mov eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100168e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2b4], eax
lea ecx, [ebp - 0x160]
push ecx
lea edx, [ebp - 0x268]
push edx
mov eax, dword [ebp - 0x2b4]
push eax
push str.DismountDisk._4.__08X.__s.__s.
push 0x100273cc
push 2
call fcn.1000eed0
add esp, 0x18
push 0x3c
push 0
lea ecx, [ebp - 0x2b0]
push ecx
call fcn.1001ea50
add esp, 0xc
mov dword [ebp - 0x2b0], 0x3c
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], str.open
lea edx, [ebp - 0x268]
mov dword [ebp - 0x2a0], edx
mov dword [ebp - 0x294], 1
movsx eax, byte [ebp - 0x160]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x160]
and eax, ecx
mov dword [ebp - 0x298], eax
mov dword [ebp - 0x2ac], 0x40
cmp dword [ebp - 0x2b4], 0xc1
jne 0x10016742
lea edx, [ebp - 0x2b0]
push edx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x1001676c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DismountDisk._5.__08X.
push 0x100273cc
push 1
call fcn.1000eed0
add esp, 0x10
mov dword [ebp - 0x2b4], 0xc0
jmp 0x100168db
mov dword [ebp - 0x2b8], 0
mov dword [ebp - 0x2bc], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.100162b0
add esp, 4
mov dword [ebp - 0x2bc], eax
lea eax, [ebp - 0x160]
push eax
lea ecx, [ebp - 0x268]
push ecx
mov edx, dword [ebp - 0x2bc]
push edx
mov eax, dword [ebp - 0x278]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DismountDisk._6.__08X.__08X.__08X.__s.__s.
push 0x100273cc
push 3
call fcn.1000eed0
add esp, 0x20
mov ecx, dword [ebp - 0x2bc]
push ecx
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x278], eax
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x2710
mov edx, dword [ebp - 0x278]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x1001689a
mov dword [ebp - 0x2c0], 0
mov dword [ebp - 0x2c4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DismountDisk._7.__08X.
push 0x100273cc
push 1
call fcn.1000eed0
add esp, 0x10
mov eax, dword [ebp - 0x2bc]
push eax
call fcn.100153a0
add esp, 4
mov dword [ebp - 0x2c4], eax
cmp dword [ebp - 0x2c4], 0
je 0x10016884
lea ecx, [ebp - 0x2c0]
push ecx
mov edx, dword [ebp - 0x2c4]
push edx
call fcn.100153d0
add esp, 8
test eax, eax
je 0x10016884
cmp dword [ebp - 0x2c0], 0
jne 0x10016884
cmp dword [ebp - 0x2b8], 6
jb 0x10016886
jmp 0x1001689a
mov eax, dword [ebp - 0x2b8]
add eax, 1
mov dword [ebp - 0x2b8], eax
jmp 0x100167ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DismountDisk._8.__08X.
push 0x100273cc
push 3
call fcn.1000eed0
add esp, 0x10
push 0
mov ecx, dword [ebp - 0x278]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edx, dword [ebp - 0x278]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x2b4], 0
mov eax, dword [ebp - 0x2b4]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.1001e830
add esp, 4
add eax, 1
mov dword [ebp - 0x164], eax
mov edx, dword [ebp - 0x5c]
add edx, dword [ebp - 0x164]
mov dword [ebp - 0x5c], edx
jmp 0x10016438
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x19c]
push ecx
mov edx, dword [0x100316dc]
push edx
call fcn.100132c0
add esp, 8
test eax, eax
jne 0x1001693d
push 0x10de
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10016b78
cmp dword [0x10038c5c], 0
je 0x10016973
push 0
push 0
push 0
push 0x100273cc
push 1
push 0x100273cc
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x19c]
push ecx
mov edx, dword [0x100316e4]
push edx
call fcn.1000c140
add esp, 0x20
jmp 0x1001699c
push 0
push 0
push 0x100273cc
push 1
push 0x100273cc
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x19c]
push ecx
mov edx, dword [0x100316e4]
push edx
call fcn.1000bfd0
add esp, 0x1c
mov dword [ebp - 0x2c8], 0
mov eax, dword [ebp - 4]
movsx ecx, byte [eax + 0x88]
cmp ecx, 0x5c
jne 0x100169c8
mov edx, dword [ebp - 4]
movsx eax, byte [edx + 0x89]
cmp eax, 0x5c
je 0x10016a63
mov ecx, dword [0x10029248]
mov dword [ebp - 0x2d0], ecx
mov edx, dword [0x1002924c]
mov dword [ebp - 0x2cc], edx
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x88]
mov byte [ebp - 0x2cc], cl
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
lea edx, [ebp - 0x2d0]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x2d4], eax
cmp dword [ebp - 0x2d4], 0xffffffff
je 0x10016a63
push 0
lea eax, [ebp - 0x2d8]
push eax
push 0
push 0
push 0
push 0
push 0x70024
mov ecx, dword [ebp - 0x2d4]
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x10016a56
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x13
jne 0x10016a56
mov dword [ebp - 0x2c8], 1
mov edx, dword [ebp - 0x2d4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2c8], 0
jne 0x10016ab6
mov dword [ebp - 0x2dc], 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x1ac]
and ecx, 4
test ecx, ecx
jne 0x10016a90
mov dword [ebp - 0x2dc], 6
mov edx, dword [ebp - 0x2dc]
or edx, 0x21
mov dword [ebp - 0x2dc], edx
mov eax, dword [ebp - 0x2dc]
push eax
mov ecx, dword [ebp - 4]
add ecx, 0x88
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 4]
cmp dword [edx + 0x3db4], 0
jne 0x10016aed
mov eax, dword [ebp - 4]
add eax, 0x3db8
mov dword [ebp - 0x2e0], eax
mov ecx, dword [ebp - 0x2e0]
mov edx, dword [ebp - 0x2e0]
mov eax, dword [ecx]
or eax, dword [edx + 4]
test eax, eax
je 0x10016b37
cmp dword [0x10038c5c], 0
je 0x10016b1b
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x3dbc]
push edx
mov eax, dword [ecx + 0x3db8]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x3db0]
push edx
call fcn.1000b9e0
add esp, 0xc
jmp 0x10016b37
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x3db4]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x3db0]
push eax
call fcn.1000b8f0
add esp, 8
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x19c]
mov dword [edx*4 + 0x10038bf0], 0
push 0x3dc0
push 0
mov eax, dword [ebp - 4]
push eax
call fcn.1001ea50
add esp, 0xc
mov ecx, dword [ebp - 4]
push ecx
call fcn.1001ee98
add esp, 4
mov edx, dword [ebp + 8]
mov dword [edx], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4