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

Disassembly:
push 0xffffffffffffffff
push 0x40b2f8
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x410018]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push ebp
push esi
mov eax, dword [0x410018]
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 [0x4125dd], 0
mov dword [esp + 0x20], ebx
je 0x4065b5
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 0x4063fa
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 0x4063f8
jle 0x406479
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 [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
sub esi, dword [esp + 0x14]
test esi, esi
jg 0x40645e
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 0x406420
cmp dword [esp + 0x1c4], 0x10
mov eax, dword [esp + 0x1b0]
jae 0x406491
lea eax, [esp + 0x1b0]
push 0
lea edx, [esp + 0xb0]
push eax
lea eax, [esp + 0xb0]
mov dword [esp + 0xb0], edx
call fcn.00409390
lea eax, [esp + 0x10]
mov byte [esp + 0x254], 1
mov ecx, dword [esp + 0xa8]
push eax
call fcn.004091e0
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 0x4064ee
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.004092d0
lea ecx, [esp + 0x18]
mov byte [esp + 0x254], 4
push ecx
mov ecx, dword [esp + 0x28]
call fcn.00409140
mov byte [esp + 0x254], 6
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x28]
cmp eax, edx
je 0x406539
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 0x406571
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 0x406599
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 0x4065c2
push 0x412cc4
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.00409cfa
add esp, 0x248
ret