Function at 0x10004e34
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, 0x1000cbea
call fcn.1000c520
mov eax, 0x4074
call fcn.1000c570
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
cmp dword [edi + 8], esi
jne 0x10004eb8
mov edi, dword [edi + 4]
cmp edi, esi
jne 0x10004e62
mov edi, 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 edi
push str._ServeHttpEx_EMPTY_PATH___s
push 1
pop ebx
push ebx
call fcn.10002b6f
mov al, byte [ebp + 0x1b]
add esp, 0xc
lea ecx, [ebp - 0x34]
mov byte [ebp - 0x34], al
push esi
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 esi, str.HTTP_1.0_404_Not_Found_ServeHttpEx__r_n_r_n
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.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__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 0x18]
call fcn.100044f0
pop ecx
pop ecx
push ebx
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x10004fca
push 0x100121d8
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x24], 0x100121c8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x1c]
push edi
push eax
mov ecx, 0x100121c8
mov dword [ebp - 4], esi
call fcn.100054f3
mov eax, dword [0x100121cc]
mov ecx, dword [ebp - 0x1c]
cmp ecx, eax
mov eax, dword [edi + 4]
je 0x10004f3a
cmp eax, esi
jne 0x10004ef7
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 eax
push dword [ecx + 0x24]
push str._ServeHttpEx_FILE_ALREADY_IN_MEM__size___d__path___s
push 1
pop ebx
push ebx
call fcn.10002b6f
mov eax, dword [ebp - 0x1c]
add esp, 0x10
inc dword [eax + 0x20]
mov eax, dword [ebp - 0x1c]
push dword [eax + 0x20]
push str._ServeHttpEx_FILE_COUNT___d___
push ebx
call fcn.10002b6f
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], eax
jmp 0x100050c7
cmp eax, esi
jne 0x10004f43
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 esi
push 0x80
push 3
push esi
push 1
pop ebx
push ebx
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x10004fd1
mov edi, dword [edi + 4]
cmp edi, esi
jne 0x10004f71
mov edi, 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 edi
push str._ServeHttpEx_CANNOT_OPEN_FILE___s
push ebx
call fcn.10002b6f
mov al, byte [ebp + 0x1b]
add esp, 0xc
lea ecx, [ebp - 0x34]
mov byte [ebp - 0x34], al
push esi
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 esi, str.HTTP_1.0_404_Cannot_Open_ServeHttpEx__r_n_r_n
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.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__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 0x18]
call fcn.100044f0
pop ecx
pop ecx
push ebx
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 0x100121d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x10005282
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov eax, dword [0x100121f0]
add eax, esi
mov dword [ebp - 0x20], esi
cmp eax, 0x1000000
jge 0x100050a8
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x44], eax
mov al, byte [edi]
push 0
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], esi
mov byte [ebp - 0x70], al
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 eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [ebp - 0x70]
push dword [eax]
push 0
push edi
call dword [sym.imp.MSVCP60.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__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
lea esi, [ebp - 0x44]
lea edi, [ebp - 0x60]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x70]
mov ecx, 0x100121c8
push eax
lea eax, [ebp - 0x40]
push eax
mov byte [ebp - 4], bl
call fcn.1000537c
and byte [ebp - 4], 0
push ebx
lea ecx, [ebp - 0x70]
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 eax, dword [0x100121f0]
mov esi, dword [ebp - 0x20]
add eax, esi
push 0x1000000
push eax
push str._ServeHttpEx_LOAD_FILE_TO_MEM__USED___d_MAX___d_
push ebx
call fcn.10002b6f
add esp, 0x10
lea eax, [ebp - 0x38]
add dword [0x100121f0], esi
push 0
push eax
push esi
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x38]
push str._ServeHttpEx__d_bytes_LOADED__FILE_HANDLE_Closed_
push ebx
call fcn.10002b6f
mov edi, dword [ebp + 8]
add esp, 0xc
jmp 0x100050c5
push 0
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push str._ServeHttpEx_NOT_ENOUGH_MEM_TO_LOAD_FILE_ONCE_ONLY_
push ebx
call fcn.10002b6f
pop ecx
pop ecx
xor esi, esi
or dword [ebp - 4], 0xffffffff
push 0x100121d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 0x14]
cmp eax, esi
jne 0x100050e1
mov eax, dword [ebp - 0x20]
dec eax
sub eax, dword [ebp + 0x10]
inc eax
push eax
push str._ServeHttpEx_CONTENTLENGTH___d
push ebx
mov dword [ebp + 8], eax
call fcn.10002b6f
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov esi, 0x100110a4
push esi
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
call sub.MSVCRT.dll_strlen
add esp, 0x10
mov ecx, edi
push eax
push dword [ebp - 0x24]
push esi
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
inc eax
push dword [ecx]
mov ecx, edi
push eax
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.MSVCP60.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__::substr_unsigned_int__unsigned_int_]
mov al, byte [ebp + 0x1b]
xor esi, esi
push esi
lea ecx, [ebp - 0x54]
mov dword [ebp - 4], 2
mov byte [ebp - 0x54], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x80]
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x24], esp
push eax
call dword [sym.imp.MSVCP60.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__]
push dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
push dword [ebp - 0x20]
push dword [ebp + 8]
push dword [ebp + 0x14]
push edi
call fcn.10004547
lea eax, [ebp - 0x54]
push eax
push dword [ebp + 0x18]
call fcn.100044f0
add esp, 0x30
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp + 8]
cmp esi, eax
jge 0x1000522e
mov ecx, dword [ebp - 0x18]
sub eax, esi
test ecx, ecx
je 0x100051c4
add ecx, edi
push eax
push ecx
push dword [ebp + 0x18]
call fcn.100044a7
add esp, 0xc
mov dword [ebp - 0x10], eax
add edi, eax
add esi, eax
push eax
push str._ServeHttpEx_SENT_file___d_From_Mem
push ebx
call fcn.10002b6f
add esp, 0xc
jmp 0x10005210
mov ecx, 0x4000
cmp eax, ecx
jle 0x100051cf
mov eax, ecx
lea ecx, [ebp - 0x10]
push 0
push ecx
push eax
lea eax, [ebp - 0x4080]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x10]
push str._ServeHttpEx_PREPARE_TO_SENT_file___d
push ebx
call fcn.10002b6f
push dword [ebp - 0x10]
lea eax, [ebp - 0x4080]
push eax
push dword [ebp + 0x18]
call fcn.100044a7
add esp, 0x18
cmp eax, dword [ebp - 0x10]
jne 0x1000521c
add esi, eax
cmp dword [ebp - 0x10], 0
jg 0x10005189
jmp 0x1000522e
push eax
push dword [ebp - 0x10]
push str._ServeHttpEx___d_NEED_TO_BE_SENT___d_SENT_AT_LAST
push ebx
call fcn.10002b6f
add esp, 0x10
cmp dword [ebp - 0x18], 0
jne 0x1000524a
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str._ServeHttpEx_FILE_HANDLE_CLOSED_AFTER_SENDING
push ebx
call fcn.10002b6f
pop ecx
pop ecx
push dword [ebp + 8]
push esi
push str._ServeHttpEx___d____d_SENT_TOTALLY
push ebx
call fcn.10002b6f
add esp, 0x10
cmp esi, dword [ebp + 8]
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
push ebx
sete byte [ebp + 0x1b]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
or dword [ebp - 4], 0xffffffff
push ebx
lea ecx, [ebp - 0x80]
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 al, byte [ebp + 0x1b]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret