Function at 0x446c70
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x466de2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44c
push ebx
xor eax, eax
push ebp
push esi
mov dword [esp + 0x44], eax
push edi
xor edi, edi
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
push edi
push edi
mov dword [esp + 0x5c], eax
push 1
push edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x68], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ebp, dword [esp + 0x46c]
mov dword [esp + 0x58], eax
cmp dword [ebp + 0x24], 0xffffffff
jne 0x446e02
mov esi, dword [ebp + 0xc]
cmp esi, edi
jne 0x446cdc
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov cl, byte [esp + 0x23]
push edi
mov byte [esp + 0x2c], cl
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x2c]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x446d2e
mov edi, dword [esp + 0x2c]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], ebx
mov byte [eax + ebx], 0
mov edi, str.PIPE00
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x464], 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x30]
sub edx, ecx
cmp edx, esi
ja 0x446d62
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
test esi, esi
jbe 0x446da9
mov eax, dword [esp + 0x30]
push 0
lea ecx, [esp + 0x2c]
lea ebx, [eax + esi]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x446da9
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push ebx
lea edi, [edx + ecx]
mov ecx, esi
mov eax, ecx
mov esi, str.PIPE00
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x446db6
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
push 0x40000000
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp + 0x24], eax
mov eax, dword [esp + 0x2c]
test eax, eax
mov dword [esp + 0x464], 0xffffffff
je 0x446e02
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x446df9
cmp al, 0xff
je 0x446df9
dec al
mov byte [ecx], al
jmp 0x446e02
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [esp + 0x48]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [ebp + 0x24]
push edx
lea eax, [esp + 0x64]
push 0x400
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x446e53
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x3e5
jne 0x446ffc
mov edx, dword [esp + 0x58]
push 0x1388
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x446ffc
mov dword [esp + 0x24], eax
mov edx, dword [ebp + 0x24]
lea eax, [esp + 0x10]
push 0
lea ecx, [esp + 0x4c]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov ecx, dword [esp + 0x10]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x44], eax
jbe 0x447018
mov edi, vtable.CTakeMutex.0
mov bl, byte [esp + eax + 0x5c]
mov eax, dword [ebp + 0xac]
xor esi, esi
cmp eax, esi
je 0x446fe5
lea eax, [ebp + 0x90]
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], esi
call fcn.00440180
lea ecx, [ebp + 0x88]
mov dword [esp + 0x464], 1
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], esi
call fcn.00440180
mov esi, dword [ebp + 0xb4]
mov ecx, dword [ebp + 0xb0]
inc esi
and esi, ecx
lea eax, [esi + 1]
and eax, ecx
mov ecx, dword [ebp + 0xb8]
cmp esi, ecx
jne 0x446f72
mov al, byte [ebp + 0x84]
test al, al
jne 0x446f53
mov eax, dword [esp + 0x40]
mov byte [esp + 0x464], 1
test eax, eax
mov dword [esp + 0x38], edi
jle 0x446f22
lea ecx, [esp + 0x38]
call fcn.00440160
mov eax, dword [esp + 0x40]
test eax, eax
jg 0x446f11
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x464], 0xffffffff
test eax, eax
mov dword [esp + 0x14], edi
jle 0x446fe5
lea ecx, [esp + 0x14]
call fcn.00440160
mov eax, dword [esp + 0x1c]
test eax, eax
jg 0x446f3d
jmp 0x446fe5
mov edx, dword [ebp + 0xb8]
inc edx
mov dword [ebp + 0xb8], edx
mov eax, edx
mov edx, dword [ebp + 0xb0]
and edx, eax
mov dword [ebp + 0xb8], edx
jmp 0x446f83
cmp eax, ecx
jne 0x446f83
mov eax, dword [ebp + 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
dec edx
test eax, eax
mov dword [esp + 0x1c], edx
je 0x446f9e
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp + 0xb4]
mov eax, dword [ebp + 0xac]
mov byte [edx + eax], bl
mov dword [ebp + 0xb4], esi
mov ecx, dword [ebp + 0xa4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [esp + 0x38]
mov byte [esp + 0x464], 1
call fcn.00440120
lea ecx, [esp + 0x14]
mov dword [esp + 0x464], 0xffffffff
call fcn.00440120
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x10]
inc eax
cmp eax, ecx
mov dword [esp + 0x44], eax
jb 0x446e80
jmp 0x447018
mov eax, dword [ebp + 0x24]
cmp eax, 0xffffffff
je 0x447012
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x24], 0xffffffff
call esi
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x45c]
pop edi
movsx eax, word [esp + 0x20]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x458
ret