Function at 0x10001020
Capabilities:
Create process on windows
Create process suspended
Delete file
Get common file path
Get file size
Query environment variable
Read file on windows

Disassembly:
sub esp, 0x2c4
push ebx
push ebp
mov ebp, dword [esp + 0x2d4]
push esi
push edi
cmp dword [ebp], 1
jne 0x10001374
mov eax, dword [ebp + 4]
cmp dword [eax], 0
jne 0x10001374
mov ecx, dword [ebp + 8]
push str.help
mov edx, dword [ecx]
push edx
call fcn.10005890
add esp, 8
test eax, eax
je 0x10001374
lea eax, [esp + 0x1d0]
push 0x103
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
mov edi, str.cmd.exe
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1d0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x103
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0xd0]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push str.temp
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
mov edi, str.cmd.tmp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xcc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov eax, dword [ebp + 8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0xcc]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 7]
push eax
call fcn.100016d0
mov ebx, eax
mov edi, str.__c
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 8]
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x1000709c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xcc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x24]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x11
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov word [esp + 0x54], ax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], eax
push ecx
push edx
push eax
push eax
push eax
push eax
push eax
mov dword [esp + 0x38], eax
push eax
lea eax, [esp + 0x1f0]
push ebx
push eax
mov dword [esp + 0x4c], 0x44
call dword [sym.imp.KERNEL32.DLL_CreateProcessA]
push ebx
mov esi, eax
call fcn.10001688
add esp, 4
test esi, esi
jne 0x10001267
lea ecx, [esp + 0x68]
push 0xa
push ecx
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.100057fa
lea edx, [esp + 0x74]
lea eax, [esp + 0x74]
push edx
push str.Shell
push eax
call fcn.10001636
lea edi, [esp + 0x80]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.100016d0
mov ebx, dword [esp + 0x2f4]
mov edx, eax
add esp, 0x1c
lea edi, [esp + 0x68]
mov dword [ebx + 0xc], edx
jmp 0x100013a1
mov eax, dword [esp + 0x10]
push 0x7530
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
push 0
push 0x20
push 3
push 0
push 3
lea ecx, [esp + 0xe0]
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x10001318
push 0
push ebp
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov esi, eax
lea edx, [esi + 0x64]
push edx
call fcn.100016d0
mov ecx, dword [esp + 0x2dc]
add esp, 4
lea edx, [esp + 0x20]
lea ebx, [ecx + 0xc]
push 0
lea ecx, [esi + 1]
push edx
push ecx
push eax
push ebp
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov edx, dword [ebx]
mov edi, 0x10007078
or ecx, 0xffffffff
xor eax, eax
mov byte [edx + esi], 0
push ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebx]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [esp + 0xcc]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
jmp 0x10001352
push 0x64
call fcn.100016d0
mov ecx, dword [esp + 0x2dc]
mov edx, eax
mov edi, 0x10007078
xor eax, eax
lea ebx, [ecx + 0xc]
or ecx, 0xffffffff
add esp, 4
mov dword [ebx], edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x2e4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
mov dword [edx], ecx
mov eax, dword [ebx]
pop esi
pop ebp
pop ebx
add esp, 0x2c4
ret
push 0xc8
call fcn.100016d0
mov ebx, dword [esp + 0x2dc]
mov edx, eax
add esp, 4
test edx, edx
mov dword [ebx + 0xc], edx
jne 0x1000139c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c4
ret
mov edi, 0x10007030
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x2e4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
mov dword [edx], ecx
mov eax, dword [ebx + 0xc]
pop esi
pop ebp
pop ebx
add esp, 0x2c4
ret