Function at 0x406f60
Capabilities:
Read file on windows
Read pipe

Disassembly:
push 0xffffffffffffffff
push 0x40ca78
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x412018]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push ebp
push esi
mov eax, dword [0x412018]
xor eax, esp
push eax
lea eax, [esp + 0x24c]
mov dword fs:[0], eax
xor esi, esi
mov ebx, ecx
mov dword [esp + 0x10], esi
cmp byte [0x41461d], 0
mov dword [esp + 0x20], ebx
je 0x4071b5
push 0x7f
lea eax, [esp + 0x1cd]
push esi
push eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x20], esi
mov byte [esp + 0x1d4], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
lea ecx, [esp + 0x1ac]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov dword [esp + 0x254], esi
mov ebp, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406ffa
xor esi, esi
mov edx, dword [edi + 0x1c]
push esi
lea ecx, [esp + 0x20]
push ecx
push esi
push esi
push esi
push edx
call ebp
push 0x32
call ebx
mov esi, dword [esp + 0x1c]
test esi, esi
jbe 0x406ff8
jle 0x407079
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ecx]
mov edx, dword [edi + 0x1c]
push 0
lea eax, [esp + 0x18]
push eax
push 0x7f
lea ecx, [esp + 0x1d4]
push ecx
push edx
call ebx
lea eax, [esp + 0x1c8]
push eax
lea ecx, [esp + 0x1b0]
mov byte [esp + 0x24b], 0
call dword [0x40e1b0]
sub esi, dword [esp + 0x14]
test esi, esi
jg 0x40705e
xor esi, esi
push 0x80
lea ecx, [esp + 0x1cc]
push 0
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
test esi, esi
jg 0x407020
cmp dword [esp + 0x1c4], 0x10
mov eax, dword [esp + 0x1b0]
jae 0x407091
lea eax, [esp + 0x1b0]
push 0
lea edx, [esp + 0xb0]
push eax
lea eax, [esp + 0xb0]
mov dword [esp + 0xb0], edx
call fcn.0040a750
lea eax, [esp + 0x10]
mov byte [esp + 0x254], 1
mov ecx, dword [esp + 0xa8]
push eax
call fcn.0040a5c0
mov bl, 3
mov byte [esp + 0x254], bl
mov eax, dword [esp + 0xa8]
mov esi, dword [sym.imp.MSVCR90.dll_free]
lea ecx, [esp + 0xac]
cmp eax, ecx
je 0x4070ee
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x10]
push 0xfde9
lea edx, [esp + 0x2c]
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], edx
call fcn.0040a690
lea ecx, [esp + 0x18]
mov byte [esp + 0x254], 4
push ecx
mov ecx, dword [esp + 0x28]
call fcn.0040a500
mov byte [esp + 0x254], 6
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x28]
cmp eax, edx
je 0x407139
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov byte [esp + 0x254], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407171
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x254], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407199
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1ac]
mov dword [esp + 0x254], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, esi
jmp 0x4071c2
push 0x41521c
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov eax, ebx
mov ecx, dword [esp + 0x24c]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.0040b0ba
add esp, 0x248
ret