Function at 0x4a6d00
Capabilities:
Create pipe
Create process on windows
Create thread
Get common file path
Parse pe header
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa90
mov eax, dword [0x53273c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xa24], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0xa34], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0xa38], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x9f4], eax
mov eax, dword [ebp + 0x2c]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0xa3c], eax
xor eax, eax
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0xa0c], eax
lea eax, [ebp - 0x744]
push 0x400
push eax
push esi
call fcn.004a6350
add esp, 0xc
test eax, eax
jne 0x4a6d97
push esi
push str.Cannot_invoke__s:_no_such_program._n
push 1
call fcn.004d27a8
add esp, 4
push eax
call fcn.00408350
add esp, 0xc
mov eax, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ceaf9
mov esp, ebp
pop ebp
ret
push ebx
lea eax, [ebp - 0x744]
push 0x4fc778
push eax
call fcn.004d5440
mov esi, eax
mov dword [ebp - 0x9ec], 0
add esp, 8
test esi, esi
je 0x4a6fd3
push esi
push 1
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004d563d
add esp, 0x10
test eax, eax
je 0x4a6e3a
mov eax, 0x5a4d
cmp word [ebp - 0x44], ax
jne 0x4a6e3a
push 0
push dword [ebp - 8]
mov dword [ebp - 0x9ec], 1
push esi
call fcn.004d5a53
add esp, 0xc
test eax, eax
jne 0x4a6e3a
push esi
push 1
lea eax, [ebp - 0x9e8]
push 4
push eax
call fcn.004d563d
add esp, 0x10
test eax, eax
je 0x4a6e3a
mov eax, dword [ebp - 0x9e8]
cmp eax, 0x4550
je 0x4a6e30
movzx eax, ax
sub eax, 0x454c
je 0x4a6e30
sub eax, 2
jne 0x4a6e3a
mov dword [ebp - 0x9ec], 0
push esi
call fcn.004d5359
mov esi, dword [ebp - 0x9ec]
add esp, 4
test esi, esi
je 0x4a6fd3
push 0x200
lea eax, [ebp - 0x944]
push eax
push str.exhelp32.exe
call fcn.004a6350
add esp, 0xc
test eax, eax
jne 0x4a6ea1
push str.exhelp32.exe
push str.Cannot_invoke__s:_no_such_program._n
push 1
call fcn.004d27a8
add esp, 4
push eax
call fcn.00408350
add esp, 0xc
mov eax, 0x7f
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ceaf9
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x540bfc]
test ecx, ecx
je 0x4a6ecc
lea ebx, [ebp - 0x244]
mov dword [ebp - 0x9ec], esi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ebx], al
test al, al
je 0x4a6eec
inc ebx
lea eax, [ebp - 0x45]
cmp ebx, eax
jb 0x4a6eb7
jmp 0x4a6eec
lea eax, [ebp - 0x244]
push eax
push 0x200
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ebx, [ebp - 0x244]
mov dword [ebp - 0x9ec], esi
add ebx, eax
mov eax, ebx
lea ecx, [ebp - 0x244]
sub eax, ecx
cmp eax, 0x1f2
ja 0x4a6f7f
mov eax, ecx
cmp ebx, eax
jbe 0x4a6f1a
mov al, byte [ebx - 1]
cmp al, 0x2f
je 0x4a6f1a
cmp al, 0x3a
je 0x4a6f1a
cmp al, 0x5c
je 0x4a6f1a
mov byte [ebx], 0x5c
inc ebx
mov ecx, str.exhelper.
mov byte [ebx], 0x65
sub ecx, ebx
mov al, byte [ebx + ecx + 1]
inc ebx
mov byte [ebx], al
test al, al
jne 0x4a6f24
xor esi, esi
push esi
push str._03d
push ebx
call fcn.004086e0
lea eax, [ebp - 0x244]
push 0x4fc778
push eax
call fcn.004d5440
add esp, 0x14
test eax, eax
je 0x4a6f95
push eax
call fcn.004d5359
inc esi
add esp, 4
cmp esi, 0x3e8
jl 0x4a6f31
push str.Cant_create_exhelper.nnn._n
push 1
call fcn.004d27a8
add esp, 4
push eax
call fcn.00408350
add esp, 8
pop ebx
pop edi
mov eax, 0x7f
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ceaf9
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x244]
push 0x4fcca0
push eax
call fcn.004d5440
add esp, 8
test eax, eax
je 0x4a6f67
mov dword [ebp - 0xa20], eax
lea eax, [ebp - 0x344]
mov dword [ebp - 0xa1c], eax
mov dword [ebp - 0xa18], eax
lea eax, [ebp - 0x244]
mov dword [ebp - 0xa14], eax
jmp 0x4a6fd9
mov ebx, dword [ebp - 0x9e8]
mov esi, dword [0x533f1c]
mov dword [ebp - 0x9e8], esi
test esi, esi
jne 0x4a6ff2
cmp dword [ebp + 0x1c], esi
jne 0x4a6ff2
test edi, edi
je 0x4a700e
lea eax, [ebp - 0x9fc]
push eax
call fcn.004a68a0
add esp, 4
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0xa0c], eax
jmp 0x4a7010
xor eax, eax
mov dword [ebp - 0xa28], 0
test eax, eax
je 0x4a70c1
push 1
call fcn.004d27a8
add esp, 4
mov dword [ebp - 0xa10], eax
test edi, edi
je 0x4a703e
mov eax, dword [edi]
mov dword [ebp - 0xa10], eax
xor eax, eax
mov dword [ebp - 0xa28], 1
test edi, edi
cmove eax, esi
mov esi, dword [ebp - 0x9f8]
mov dword [ebp - 0x9e8], eax
mov dword [ebp - 0x9f0], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push 1
push 0
lea ecx, [ebp - 0x9f0]
push ecx
push eax
push esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x4a7089
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call eax
mov edi, dword [ebp - 0x9f0]
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff5
mov dword [ebp - 0x9f8], edi
call esi
push 0xfffffffffffffff4
mov dword [ebp - 0xa2c], eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_SetStdHandle]
push edi
push 0xfffffffffffffff5
mov dword [ebp - 0xa30], eax
call esi
push edi
push 0xfffffffffffffff4
call esi
jmp 0x4a70e5
mov eax, dword [ebp - 0xa00]
mov dword [ebp - 0xa10], eax
mov eax, dword [ebp - 0xa00]
mov dword [ebp - 0xa2c], eax
mov eax, dword [ebp - 0xa00]
mov dword [ebp - 0xa30], eax
push 0x44
lea eax, [ebp - 0xa90]
push 0
push eax
call fcn.004d0130
mov eax, 5
mov dword [ebp - 0xa90], 0x44
push 1
push 2
mov word [ebp - 0xa60], ax
call fcn.004d362b
movsd xmm0, qword [0x535d28]
xorps xmm1, xmm1
mov dword [ebp - 0xa00], eax
add esp, 0x14
or eax, 0xffffffff
mov dword [ebp - 0x954], 0
comisd xmm0, xmm1
mov dword [ebp - 0xa04], eax
mov dword [ebp - 0x958], 0
jbe 0x4a718d
call fcn.0040c9b0
fsubr qword [0x535d28]
xorps xmm1, xmm1
fstp qword [ebp - 0xa08]
movsd xmm0, qword [ebp - 0xa08]
comisd xmm0, xmm1
jbe 0x4a717c
mulsd xmm0, qword [0x4fca90]
call fcn.004cec00
jmp 0x4a7181
mov eax, 0xa
mov dword [ebp - 0xa04], eax
mov dword [ebp - 0x948], eax
cmp dword [ebp - 0x9ec], 0
je 0x4a72d6
mov edi, dword [ebp - 0xa24]
lea eax, [ebp - 0x744]
mov esi, dword [edi]
mov dword [edi], eax
lea eax, [ebp - 0xa20]
push eax
push edi
call fcn.004a65c0
lea eax, [ebp - 0xa20]
mov dword [edi], esi
push eax
push dword [ebp - 0x9f4]
call fcn.004a65c0
lea eax, [ebp - 0xa20]
push eax
push 0x5248c8
call fcn.004a65c0
mov esi, dword [ebp - 0xa20]
mov eax, dword [ebp - 0xa18]
sub eax, dword [ebp - 0xa1c]
push esi
push 1
push eax
lea eax, [ebp - 0x344]
push eax
call fcn.004d2bdb
push esi
call fcn.004d5359
add esp, 0x2c
lea edx, [ebp - 0x944]
xor eax, eax
lea ecx, [edx + 1]
mov dword [ebp - 0x9f4], eax
mov al, byte [edx]
inc edx
test al, al
jne 0x4a7218
sub edx, ecx
lea ecx, [ebp - 0x244]
lea esi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a7230
sub ecx, esi
lea eax, [ecx + 0xa]
add eax, edx
push eax
call fcn.004538c0
mov esi, eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x944]
mov dword [ebp - 0x9f0], esi
push eax
push str._s__s
push esi
call fcn.004086e0
add esp, 0x14
lea edi, [esi + eax]
call fcn.004e37bc
mov esi, dword [eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x4a72c9
nop dword [eax + eax]
mov edx, str.dos_wait
mov al, 0x64
mov ah, byte [ecx]
cmp ah, al
jne 0x4a7298
mov al, byte [edx + 1]
inc edx
inc ecx
test al, al
jne 0x4a7287
mov ah, byte [ecx]
cmp ah, 0x3d
jne 0x4a72a2
cmp byte [edx], 0
je 0x4a72b9
mov ecx, dword [esi + 4]
add esi, 4
test ecx, ecx
jne 0x4a7280
lea esi, [ebp - 0x944]
xor edi, edi
jmp 0x4a740a
add ecx, 1
je 0x4a72c9
cmp byte [ecx], 0x31
jne 0x4a72c9
mov dword [edi], 0x772d20
lea esi, [ebp - 0x944]
xor edi, edi
jmp 0x4a740a
push 0
push 0x20
push dword [ebp - 0xa24]
call fcn.004a6650
push 0x40
push 0
push dword [ebp - 0x9f4]
mov dword [ebp - 0x9f0], eax
call fcn.004a6650
movsd xmm0, qword [0x535d28]
xorps xmm1, xmm1
add esp, 0x18
mov edi, eax
comisd xmm0, xmm1
mov dword [ebp - 0x9f4], edi
jbe 0x4a7404
push 0x400
lea eax, [ebp - 0xa1c]
mov dword [ebp - 0xa1c], 0xc
push eax
lea eax, [ebp - 0x954]
mov dword [ebp - 0xa18], 0
push eax
lea eax, [ebp - 0x958]
mov dword [ebp - 0xa14], 1
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x4a7367
mov dword [ebp - 0x958], eax
jmp 0x4a7404
push dword [ebp - 0x954]
lea eax, [ebp - 0x44]
push dword [ebp - 0x958]
push str.SW_sigpipe_ld__ld_7
push 0x40
push eax
call fcn.004085b0
add esp, 0x14
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x94c], eax
mov esi, edi
mov al, byte [edi]
test al, al
je 0x4a73f0
cmp al, 0x53
jne 0x4a73c3
cmp byte [esi + 1], 0x57
jne 0x4a73c3
push 9
lea eax, [esi + 2]
push str._sigpipe
push eax
call fcn.004d9aa0
add esp, 0xc
test eax, eax
je 0x4a73d2
mov al, byte [esi]
inc esi
test al, al
jne 0x4a73c3
mov al, byte [esi]
test al, al
jne 0x4a73a2
jmp 0x4a73f0
lea ecx, [esi + 0xb]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a73d5
cmp byte [ecx], al
je 0x4a73f0
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi], al
inc esi
test al, al
jne 0x4a73e0
cmp byte [ecx], al
jne 0x4a73e0
lea ecx, [ebp - 0x44]
sub ecx, esi
mov al, byte [esi + ecx]
lea esi, [esi + 1]
mov byte [esi - 1], al
test al, al
jne 0x4a73f5
mov byte [esi], al
lea esi, [ebp - 0x744]
lea eax, [ebp - 0xa4c]
push eax
lea eax, [ebp - 0xa90]
push eax
push 0
push edi
push 0
push 1
push 0
push 0
push dword [ebp - 0x9f0]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp dword [ebp - 0xa28], 0
mov edi, eax
je 0x4a7457
push dword [ebp - 0xa2c]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_SetStdHandle]
push dword [ebp - 0xa30]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_SetStdHandle]
test edi, edi
jne 0x4a74a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.CreateProcess___s___failure__nError_code__ld._n
push 1
call fcn.004d27a8
add esp, 4
push eax
call fcn.00408350
add esp, 0x10
cmp dword [ebp - 0xa0c], edi
je 0x4a7499
push dword [ebp - 0x9fc]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [ebp - 0x9f8]
call ebx
mov dword [ebp - 0x9e4], 1
jmp 0x4a7816
push dword [ebp - 0xa48]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
cmp dword [ebp - 0xa0c], 0
mov eax, dword [ebp - 0xa4c]
mov dword [ebp - 0x950], eax
je 0x4a7625
push dword [ebp - 0x9f8]
call esi
cmp dword [ebp - 0x958], 0
je 0x4a74f6
lea eax, [ebp - 0x958]
push eax
push 0
push 0x4a6830
call fcn.004d503f
add esp, 0xc
cmp dword [ebp - 0x9e8], 0
lea eax, [ebp - 0x9e4]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push eax
push 0x400
lea eax, [ebp - 0x744]
push eax
push dword [ebp - 0x9fc]
je 0x4a758a
mov edi, dword [str.misc]
mov dword [ebp - 0x9e8], edi
call esi
test eax, eax
je 0x4a757f
mov edi, dword [ebp - 0xa34]
push edi
call fcn.00411360
lea eax, [ebp - 0x744]
push eax
push dword [ebp - 0x9e4]
push str._.s
call fcn.004084d0
add esp, 0x10
lea eax, [ebp - 0x9e4]
push 0
push eax
push 0x400
lea eax, [ebp - 0x744]
push eax
push dword [ebp - 0x9fc]
call esi
test eax, eax
jne 0x4a7538
mov edi, dword [ebp - 0x9e8]
push edi
call fcn.00411360
add esp, 4
jmp 0x4a75d7
call esi
test eax, eax
je 0x4a75d7
mov edi, dword [ebp - 0xa10]
mov eax, dword [ebp - 0x9e4]
test eax, eax
je 0x4a75d7
lea ecx, [ebp - 0x744]
push ecx
push eax
push str._.s
push edi
call fcn.00408350
add esp, 0x10
lea eax, [ebp - 0x9e4]
push 0
push eax
push 0x400
lea eax, [ebp - 0x744]
push eax
push dword [ebp - 0x9fc]
call esi
test eax, eax
jne 0x4a7596
push dword [ebp - 0x9fc]
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
cmp dword [ebp - 0x958], 0
je 0x4a7625
call fcn.0040c9b0
fsubr qword [0x535d28]
xorps xmm1, xmm1
fstp qword [ebp - 0xa08]
movsd xmm0, qword [ebp - 0xa08]
comisd xmm0, xmm1
jbe 0x4a761e
mulsd xmm0, qword [0x4fca90]
call fcn.004cec00
jmp 0x4a762b
mov eax, 0xa
jmp 0x4a762b
mov eax, dword [ebp - 0xa04]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push eax
push dword [ebp - 0xa4c]
mov dword [ebp - 0x9e4], 0
call esi
mov ecx, dword [ebp - 0x958]
mov edi, eax
test ecx, ecx
je 0x4a7662
push dword [ebp - 0x94c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp - 0x958]
cmp edi, 0x102
jne 0x4a76bc
mov dword [0x540f0c], 2
mov dword [0x546308], 2
mov dword [0x54154c], 2
test ecx, ecx
je 0x4a76ac
lea eax, [ebp - 0x958]
push eax
push 0
push fcn.004a6210
call fcn.004d503f
add esp, 0xc
push 0x1194
push eax
call esi
jmp 0x4a76cf
push 0x3f
push dword [ebp - 0xa4c]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x4a76cf
lea eax, [ebp - 0x9e4]
push eax
push dword [ebp - 0xa4c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0xa38]
push dword [ebp - 0xa4c]
call fcn.0040c830
mov eax, dword [ebp - 0x958]
add esp, 8
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4a7706
push eax
call esi
push dword [ebp - 0x954]
call esi
push dword [ebp - 0x94c]
call esi
push dword [ebp - 0xa4c]
call esi
cmp dword [ebp - 0x9ec], 0
mov eax, dword [ebp - 0x9e4]
je 0x4a77a3
mov dword [ebp - 0x9e8], eax
lea eax, [ebp - 0x244]
push 0x4fc778
push eax
mov word [ebx - 3], 0x7672
call fcn.004d5440
mov edi, dword [sym.imp.KERNEL32.dll_OpenFile]
mov esi, eax
add esp, 8
test esi, esi
je 0x4a777c
push esi
push 1
lea eax, [ebp - 0x9e8]
push 4
push eax
call fcn.004d563d
push esi
call fcn.004d5359
add esp, 0x14
lea eax, [ebp - 0x9e0]
push 0x200
push eax
lea eax, [ebp - 0x244]
push eax
call edi
push 0x200
lea eax, [ebp - 0x9e0]
mov word [ebx - 3], 0x7265
push eax
lea eax, [ebp - 0x244]
push eax
call edi
mov eax, dword [ebp - 0x9e8]
mov dword [ebp - 0x9e4], eax
mov ebx, dword [ebp + 0x10]
mov esi, ebx
neg esi
test ebx, ebx
cmovns esi, ebx
cmp eax, dword [ebp + 0x14]
ja 0x4a77b8
cmp eax, esi
jbe 0x4a7816
push eax
push str.exit_value__lu_n
push 1
call fcn.004d27a8
add esp, 4
push eax
call fcn.00408350
mov eax, dword [ebp - 0x9e4]
add esp, 0xc
cmp eax, esi
jbe 0x4a7811
cmp dword [0x546308], 0
jne 0x4a7807
test ebx, ebx
jle 0x4a7807
push eax
push dword [ebp - 0xa3c]
push str.Specifying__option__s__ld___would_suppress___BREAK__._n
push 1
call fcn.004d27a8
add esp, 4
push eax
call fcn.00408350
add esp, 0x10
mov dword [0x546308], 1
call fcn.0044ca70
mov eax, dword [ebp - 0x9f4]
test eax, eax
je 0x4a7829
push eax
call fcn.004d2dae
add esp, 4
push dword [ebp - 0x9f0]
call fcn.004d2dae
push dword [ebp - 0xa00]
push 2
call fcn.004d362b
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp - 0x9e4]
xor ecx, ebp
pop ebx
pop edi
pop esi
call fcn.004ceaf9
mov esp, ebp
pop ebp
ret