Function at 0x401100
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
push edi
mov al, byte [0x408120]
mov byte [ebp - 0x280], al
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x27f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [ebp + 8], 0
je 0x401137
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx]
test edx, edx
jne 0x40113e
xor eax, eax
jmp 0x401547
movzx eax, byte [0x40a8d5]
test eax, eax
je 0x40117b
mov ecx, dword [ebp + 8]
push ecx
push str._nRunning_Command:_n___s
call fcn.00401e88
add esp, 8
cmp dword [ebp + 0x14], 0
je 0x40117b
mov edx, dword [ebp + 0x14]
movsx eax, byte [edx]
test eax, eax
je 0x40117b
mov ecx, dword [ebp + 0x14]
push ecx
push str._nIn_Directory:_n___s_n_n_n
call fcn.00401e88
add esp, 8
mov edx, 1
test edx, edx
je 0x40119c
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x108]
push ecx
call fcn.00401d90
add esp, 8
jmp 0x4012a0
lea edx, [ebp - 0x280]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x4011b9
xor eax, eax
jmp 0x401547
push str._sruntool2.bat
lea eax, [ebp - 0x280]
push eax
call fcn.00401da0
add esp, 8
push str.COMMAND.COM__C
lea ecx, [ebp - 0x108]
push ecx
call fcn.00401d90
add esp, 8
lea edx, [ebp - 0x280]
push edx
lea eax, [ebp - 0x108]
push eax
call fcn.00401da0
add esp, 8
push 0x408174
lea ecx, [ebp - 0x280]
push ecx
call fcn.00401d7c
add esp, 8
mov dword [ebp - 0x288], eax
cmp dword [ebp - 0x288], 0
je 0x401291
push str._echo_off_n
mov edx, dword [ebp - 0x288]
push edx
call fcn.00401d20
add esp, 8
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x288]
push ecx
call fcn.00401d20
add esp, 8
push str._nIf_Not_errorlevel_1_goto_END_n
mov edx, dword [ebp - 0x288]
push edx
call fcn.00401d20
add esp, 8
push str.echo_Error:_error_code_detected_n
mov eax, dword [ebp - 0x288]
push eax
call fcn.00401d20
add esp, 8
push str.:END
mov ecx, dword [ebp - 0x288]
push ecx
call fcn.00401d20
add esp, 8
push 0x4081d0
mov edx, dword [ebp - 0x288]
push edx
call fcn.00401d20
add esp, 8
mov eax, dword [ebp - 0x288]
push eax
call fcn.00401cca
add esp, 4
mov dword [ebp - 0x294], 0xc
mov dword [ebp - 0x290], 0
mov dword [ebp - 0x28c], 1
cmp dword [ebp + 0x10], 0
je 0x4012ed
push 0
push 0x80
push 2
lea ecx, [ebp - 0x294]
push ecx
push 2
push 0x40000000
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x120], eax
jmp 0x4012f7
mov dword [ebp - 0x120], 0
cmp dword [ebp + 0xc], 0
je 0x401326
push 0
push 0x80
push 2
lea eax, [ebp - 0x294]
push eax
push 2
push 0x40000000
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x11c], eax
jmp 0x401330
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x178], 0
call section..text
movzx edx, al
test edx, edx
je 0x4013ba
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x124], eax
push 1
mov eax, dword [ebp - 0x124]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x124]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push 0xc
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x178], eax
mov edx, dword [ebp - 0x178]
mov dword [edx], 0xc
mov eax, dword [ebp - 0x178]
mov ecx, dword [ebp - 0x124]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x178]
mov dword [edx + 8], 1
push 0x44
push 0
lea eax, [ebp - 0x170]
push eax
call fcn.00401c40
add esp, 0xc
mov dword [ebp - 0x170], 0x44
mov dword [ebp - 0x144], 1
mov dword [ebp - 0x164], str.Running_Tool
mov word [ebp - 0x140], 0
cmp dword [ebp - 0x120], 0
jne 0x401406
cmp dword [ebp - 0x11c], 0
je 0x40143a
mov ecx, dword [ebp - 0x144]
or ecx, 0x100
mov dword [ebp - 0x144], ecx
mov edx, dword [ebp - 0x11c]
mov dword [ebp - 0x134], edx
mov dword [ebp - 0x138], 0
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x130], eax
lea ecx, [ebp - 0x118]
push ecx
lea edx, [ebp - 0x170]
push edx
mov eax, dword [ebp + 0x14]
push eax
push 0
push 0x20
push 1
push 0
mov ecx, dword [ebp - 0x178]
push ecx
lea edx, [ebp - 0x108]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0x171], al
movzx eax, byte [ebp - 0x171]
test eax, eax
je 0x4014a6
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edx, [ebp - 0x284]
push edx
mov eax, dword [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
jmp 0x4014b0
mov dword [ebp - 0x284], 1
cmp dword [ebp - 0x118], 0
je 0x4014c6
mov ecx, dword [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x114], 0
je 0x4014dc
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x120], 0
je 0x4014f2
mov eax, dword [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x11c], 0
je 0x401508
mov ecx, dword [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movsx edx, byte [ebp - 0x280]
test edx, edx
je 0x401522
lea eax, [ebp - 0x280]
push eax
call fcn.00401ca0
add esp, 4
movzx ecx, byte [0x40a8d5]
test ecx, ecx
je 0x401541
mov edx, dword [ebp - 0x284]
push edx
push str._nExit_Status:__d
call fcn.00401e88
add esp, 8
mov eax, dword [ebp - 0x284]
pop edi
mov esp, ebp
pop ebp
ret