Function at 0x40a000
Capabilities:
Check if file exists
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create two anonymous pipes
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4688ab
mov eax, dword fs:[0]
push eax
sub esp, 0x3a0
mov eax, dword [0x48b270]
xor eax, esp
mov dword [esp + 0x39c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x48b270]
xor eax, esp
push eax
lea eax, [esp + 0x3b4]
mov dword fs:[0], eax
mov esi, dword [esp + 0x3c4]
mov eax, dword [esi + 0xd0]
push eax
mov dword [esp + 0x18], ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40a0f9
call fcn.00432e51
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40a078
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xd0]
push eax
lea ecx, [esp + 0x18]
push str.CW3MFCCGI::TransmitCGIResponse__Requested_file__s_does_not_exist
push ecx
mov dword [esp + 0x3c8], ebx
call fcn.00401f50
mov ecx, dword [esi + 0x34]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x24]
push 0x1f4
mov ecx, esi
call edx
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x3bc], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a1f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40a1f7
xor ebx, ebx
mov edi, 1
mov dword [esp + 0x4c], 0xc
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], edi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3bc], edi
mov dword [esp + 0x18], ebx
mov ebp, dword [sym.imp.KERNEL32.dll_CreatePipe]
push ebx
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x3c]
push eax
mov byte [esp + 0x3cc], 2
call ebp
test eax, eax
jne 0x40a221
call fcn.00432e51
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40a161
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x3bc], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x18]
push str.CW3MFCCGI::TransmitCGIResponse__Failed_to_create_anonymous_pipes_for_STDOUT_for_CGI_child_process__Error:_d
push ecx
call fcn.00401f50
mov ecx, dword [esi + 0x34]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x24]
push 0x1f4
mov ecx, esi
call edx
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x3bc], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a1d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x40a1ec
push eax
call esi
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x40a1f7
push eax
call esi
mov ecx, dword [esp + 0x3b4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x39c]
xor ecx, esp
call fcn.004517f0
add esp, 0x3ac
ret 4
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
cmp dword [esi + 0x48], ebx
je 0x40a2c7
push ebx
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x28]
push eax
call ebp
test eax, eax
jne 0x40a2c7
lea ecx, [esp + 0x14]
call fcn.00401850
mov byte [esp + 0x3bc], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x18]
push str.CW3MFCCGI::TransmitCGIResponse__Failed_to_create_anonymous_pipes_for_STDIN_for_CGI_child_process__Error:_d
push ecx
call fcn.00401f50
mov ecx, dword [esi + 0x34]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x24]
push 0x1f4
mov ecx, esi
call edx
lea ecx, [esp + 0x14]
call fcn.004018a0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40a2ad
push eax
call esi
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40a2bc
push eax
call esi
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x18]
cmp eax, ebx
jmp 0x40a1e3
mov dword [esp + 0x24], ebx
mov ebp, dword [esp + 0x18]
push 2
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push ebx
lea eax, [esp + 0x30]
push eax
call edi
push eax
push ebp
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push eax
call ebp
test eax, eax
jne 0x40a382
lea ecx, [esp + 0x14]
call fcn.00401850
mov byte [esp + 0x3bc], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x18]
push str.CW3MFCCGI::TransmitCGIResponse__Failed_to_duplicate_STDOUT_handle_for_STDERR_handle_CGI_child_process__Error:_d
push ecx
call fcn.00401f50
mov ecx, dword [esi + 0x34]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x24]
push 0x1f4
mov ecx, esi
call edx
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x3bc], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a364
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x40a29e
push eax
call esi
mov dword [esp + 0x24], ebx
jmp 0x40a29e
mov dword [esp + 0x2c], ebx
mov ecx, dword [esp + 0x30]
push 2
push ebx
push ebx
lea edx, [esp + 0x38]
push edx
mov dword [esp + 0x38], ecx
call edi
push eax
mov eax, dword [esp + 0x3c]
push eax
call edi
push eax
call ebp
test eax, eax
jne 0x40a425
lea ecx, [esp + 0x14]
call fcn.00401850
mov byte [esp + 0x3bc], 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x18]
push str.CW3MFCCGI::TransmitCGIResponse__Failed_to_duplicate_STDOUT_read_handle__Error:_d
push ecx
call fcn.00401f50
mov ecx, dword [esi + 0x34]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x24]
push 0x1f4
mov ecx, esi
call edx
lea ecx, [esp + 0x14]
call fcn.004018a0
mov eax, dword [esp + 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x40a40d
push eax
call esi
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40a29e
push eax
call esi
mov dword [esp + 0x24], ebx
jmp 0x40a29e
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x40a438
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov byte [esp + 0x3bc], 0xb
cmp dword [esi + 0x48], ebx
je 0x40a510
mov eax, dword [esp + 0x20]
push 2
push ebx
push ebx
lea ecx, [esp + 0x40]
push ecx
mov dword [esp + 0x38], eax
call edi
mov edx, dword [esp + 0x38]
push eax
push edx
call edi
push eax
call ebp
test eax, eax
jne 0x40a507
lea ecx, [esp + 0x14]
call fcn.00401850
mov byte [esp + 0x3bc], 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x18]
push str.CW3MFCCGI::TransmitCGIResponse__Failed_to_duplicate_STDIN_write_handle__Error:_d
push eax
call fcn.00401f50
mov ecx, dword [esi + 0x34]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x24]
push 0x1f4
mov ecx, esi
call edx
lea ecx, [esp + 0x14]
call fcn.004018a0
lea ecx, [esp + 0x34]
call fcn.00407880
lea ecx, [esp + 0x2c]
call fcn.00407880
lea ecx, [esp + 0x24]
call fcn.00407880
lea ecx, [esp + 0x20]
call fcn.00407880
lea ecx, [esp + 0x1c]
call fcn.00407880
lea ecx, [esp + 0x18]
call fcn.00407880
lea ecx, [esp + 0x30]
call fcn.00407880
jmp 0x40a1f7
lea ecx, [esp + 0x20]
call fcn.00407880
push 0x44
lea eax, [esp + 0x6c]
push ebx
push eax
call fcn.00451390
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
mov dword [esp + 0xb0], ecx
xor ecx, ecx
add esp, 0xc
mov word [esp + 0x98], cx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0xa0], edx
mov edx, dword [ecx]
mov edx, dword [edx + 4]
mov dword [esp + 0xa8], eax
push esi
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x70], 0x44
mov dword [esp + 0x9c], 0x101
call edx
mov eax, dword [esp + 0x40]
mov ebp, dword [eax - 0xc]
mov dword [esp + 0x28], ebp
add ebp, 2
push ebp
mov byte [esp + 0x3c0], 0xd
call fcn.004318d6
mov ecx, dword [esp + 0x44]
push ecx
mov edi, eax
push ebp
push edi
call fcn.00453ad5
add esp, 0x10
xor eax, eax
mov byte [edi + ebp - 1], bl
cmp dword [esp + 0x28], ebx
jbe 0x40a5be
mov ecx, dword [esp + 0x28]
lea esp, [esp]
cmp byte [eax + edi], 0xa
jne 0x40a5b9
mov byte [eax + edi], bl
inc eax
cmp eax, ecx
jb 0x40a5b0
mov eax, dword [esi + 0xd0]
push ebx
push ebx
push ebx
push ebx
push pe_nt_image_headers32
lea edx, [esp + 0xc0]
push edx
push 3
lea ecx, [esp + 0x60]
push ecx
push eax
call fcn.00452e01
push ebx
push ebx
lea edx, [esp + 0xd8]
push edx
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x2e0]
push 0x104
push ecx
call fcn.00452cf8
mov ecx, dword [esp + 0x50]
mov edx, dword [ecx]
mov edx, dword [edx + 8]
add esp, 0x3c
push esi
lea eax, [esp + 0x3c]
push eax
call edx
mov ecx, dword [esp + 0x38]
mov ebp, dword [ecx - 0xc]
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, dword [ecx - 4]
sub eax, ebp
or eax, edx
mov byte [esp + 0x3bc], 0xe
jge 0x40a645
push ebp
lea ecx, [esp + 0x3c]
call fcn.004017a0
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x58]
push eax
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x2b4]
push eax
push edi
push 0x10
push 1
push ebx
push ebx
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x28], eax
call ebp
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x38]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.00450e3f
add esp, 8
cmp eax, ebx
jl 0x40aa0f
mov ecx, dword [esp + 0x38]
cmp eax, dword [ecx - 8]
jg 0x40aa0f
mov dword [ecx - 0xc], eax
mov ecx, dword [esp + 0x38]
push edi
mov byte [eax + ecx], bl
call fcn.004318cb
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
cmp eax, ebx
je 0x40a6c4
push eax
call edi
mov dword [esp + 0x18], ebx
cmp dword [esi + 0x48], ebx
je 0x40a6d8
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40a6d8
push eax
call edi
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40a6e7
push eax
call edi
mov dword [esp + 0x24], ebx
cmp dword [esp + 0x28], ebx
jne 0x40a828
lea ecx, [esp + 0x28]
call fcn.00401850
mov byte [esp + 0x3bc], 0xf
call ebp
push eax
lea edx, [esp + 0x2c]
push str.CW3MFCCGI::TransmitCGIResponse__Failed_to_run_the_CGI_child_process__Error:_d
push edx
call fcn.00401f50
mov ecx, dword [esi + 0x34]
mov eax, dword [ecx]
mov eax, dword [eax + 0x18]
add esp, 0xc
lea edx, [esp + 0x28]
push edx
call eax
cmp dword [esp + 0x48], 2
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
mov ecx, esi
jne 0x40a73b
push 0x194
jmp 0x40a740
push 0x1f4
call eax
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x3bc], 0xe
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a76a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov byte [esp + 0x3bc], 0xd
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a792
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
mov byte [esp + 0x3bc], 0xb
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a7ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x40a7c9
push eax
call edi
mov dword [esp + 0x34], ebx
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40a7d8
push eax
call edi
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40a7e7
push eax
call edi
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40a7f6
push eax
call edi
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40a805
push eax
call edi
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40a814
push eax
call edi
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x40a1f7
push eax
call edi
jmp 0x40a1f7
mov ebp, dword [esp + 0x14]
cmp dword [esi + 0x48], ebx
je 0x40a850
mov eax, dword [esp + 0x34]
mov edx, dword [ebp]
mov edx, dword [edx + 0x10]
push eax
push esi
mov ecx, ebp
call edx
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x40a850
push eax
call edi
mov dword [esp + 0x34], ebx
mov eax, dword [esi + 0xd0]
push ebx
push ebx
push pe_nt_image_headers32
lea ecx, [esp + 0x1b8]
push ecx
push ebx
push ebx
push ebx
push ebx
push eax
call fcn.00452e01
add esp, 0x24
lea edx, [esp + 0x1ac]
push edx
lea ecx, [esp + 0x40]
call fcn.00402600
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3bc], 0x10
call fcn.00409590
mov eax, dword [esp + 0x3c]
cmp dword [eax - 0xc], ebx
jge 0x40a8a2
or eax, 0xffffffff
jmp 0x40a8bd
push str.NPR_
push eax
call fcn.00452137
add esp, 8
cmp eax, ebx
jne 0x40a8b9
or eax, 0xffffffff
jmp 0x40a8bd
sub eax, dword [esp + 0x3c]
mov edx, dword [ebp]
mov edx, dword [edx + 0xc]
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, ecx
mov ecx, dword [esp + 0x2c]
push eax
lea eax, [esi + 0xf4]
push eax
push ecx
push esi
mov ecx, ebp
call edx
mov ecx, esi
cmp eax, ebx
jne 0x40a8f2
mov eax, dword [esi]
mov edx, dword [eax + 0x24]
push 0x1f4
call edx
jmp 0x40a8ff
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x34]
push 0xc8
call eax
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40a90e
push eax
call edi
mov dword [esp + 0x2c], ebx
mov ecx, dword [esp + 0x58]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 0x58]
push edx
call edi
mov eax, dword [esp + 0x5c]
push eax
call edi
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
mov byte [esp + 0x3bc], 0xe
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a951
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov byte [esp + 0x3bc], 0xd
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a979
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
mov byte [esp + 0x3bc], 0xb
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a9a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x40a9b0
push eax
call edi
mov dword [esp + 0x34], ebx
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40a9bf
push eax
call edi
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40a9ce
push eax
call edi
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40a9dd
push eax
call edi
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40a9ec
push eax
call edi
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40a9fb
push eax
call edi
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x40a1f7
push eax
call edi
jmp 0x40a1f7
push 0x80070057
call fcn.00401090
int3