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

Disassembly:
mov eax, 0x50fe63
call fcn.00508264
mov eax, 0x4274
call fcn.004a1280
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 0x14], ebx
jne 0x422722
xor eax, eax
push eax
mov eax, edi
lea ecx, [ebp - 0x38]
call fcn.004221c4
pop ecx
mov dword [ebp - 4], ebx
cmp dword [eax + 0x18], 0x10
jb 0x4226d8
mov eax, dword [eax + 4]
jmp 0x4226db
add eax, 4
push eax
push str._ServeHttpEx_EMPTY_PATH___s_n
call fcn.00413df9
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x38]
call fcn.004017de
push str.HTTP_1.0_404_Not_Found_ServeHttpEx__r_n_r_n
lea ecx, [ebp - 0x38]
call fcn.00401644
push dword [ebp + 0x14]
lea esi, [ebp - 0x38]
call fcn.004223a4
pop ecx
push ebx
push edi
mov ecx, esi
call fcn.004017de
xor al, al
jmp 0x42294c
cmp dword [edi + 0x18], 8
jb 0x42272d
mov eax, dword [edi + 4]
jmp 0x422730
lea eax, [edi + 4]
push ebx
push 0x80
push 3
push ebx
push 5
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
push ebx
cmp eax, 0xffffffff
jne 0x422794
mov eax, edi
lea ecx, [ebp - 0x38]
call fcn.004221c4
pop ecx
xor edi, edi
inc edi
mov dword [ebp - 4], edi
cmp dword [eax + 0x18], 0x10
jb 0x42276c
mov eax, dword [eax + 4]
jmp 0x42276f
add eax, 4
push eax
push str._ServeHttpEx_CANNOT_OPEN_FILE___s_n
call fcn.00413df9
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
push ebx
push edi
lea ecx, [ebp - 0x38]
call fcn.004017de
push str.HTTP_1.0_404_Cannot_Open_ServeHttpEx__r_n_r_n
jmp 0x4226fe
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push ebx
push dword [ebp + 0xc]
mov esi, eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 0x10]
cmp eax, ebx
jne 0x4227b5
lea eax, [esi - 1]
sub eax, dword [ebp + 0xc]
inc eax
push eax
push str._ServeHttpEx_CONTENTLENGTH___d_n
mov dword [ebp - 0x18], eax
call fcn.00413df9
pop ecx
pop ecx
push 0xffffffffffffffff
push edi
call fcn.0040715c
inc eax
push eax
lea eax, [ebp - 0x38]
push eax
mov ecx, edi
call fcn.004037a5
push ebx
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 2
call fcn.004221c4
pop ecx
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x38]
call fcn.0040184d
lea eax, [ebp - 0x274]
mov dword [ebp - 0x280], ebx
mov dword [ebp - 0x27c], 0x200
mov dword [ebp - 0x278], eax
lea eax, [ebp - 0x280]
push eax
sub esp, 0x1c
lea eax, [ebp - 0x58]
mov ecx, esp
mov dword [ebp - 0x3c], esp
push eax
mov byte [ebp - 4], 5
call fcn.00403731
push dword [ebp + 8]
mov ecx, dword [ebp - 0x18]
push esi
push dword [ebp + 0xc]
call fcn.0042240d
mov ecx, dword [ebp - 0x280]
mov eax, dword [ebp - 0x278]
add esp, 0x2c
mov byte [eax + ecx], bl
push dword [ebp - 0x278]
lea ecx, [ebp - 0x74]
call fcn.00401644
push dword [ebp + 0x14]
lea esi, [ebp - 0x74]
call fcn.004223a4
pop ecx
push ebx
push edi
mov ecx, esi
call fcn.004017de
mov dword [ebp - 0x14], edi
xor esi, esi
mov eax, dword [ebp - 0x18]
cmp esi, eax
jge 0x4228fa
sub eax, esi
mov ecx, 0x4000
cmp eax, ecx
jle 0x422891
mov eax, ecx
push ebx
lea ecx, [ebp - 0x14]
push ecx
push eax
lea eax, [ebp - 0x4280]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4228da
push dword [ebp - 0x14]
push str._ServeHttpEx_PREPARE_TO_SENT_file___d_n
call fcn.00413df9
push dword [ebp - 0x14]
lea ecx, [ebp - 0x4280]
push dword [ebp + 0x14]
call fcn.0042231b
add esp, 0x10
cmp eax, dword [ebp - 0x14]
jne 0x4228e9
add esi, eax
cmp dword [ebp - 0x14], ebx
jg 0x42287d
jmp 0x4228fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str._ServeHttpEx_read_file_fail_after__d_bytes__err:__d_n
jmp 0x4228f2
push eax
push dword [ebp - 0x14]
push str._ServeHttpEx___d_NEED_TO_BE_SENT___d_SENT_AT_LAST_n
call fcn.00413df9
add esp, 0xc
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str._ServeHttpEx_FILE_HANDLE_CLOSED_AFTER_SENDING_n
call fcn.00413df9
push dword [ebp - 0x18]
push esi
push str._ServeHttpEx___d____d_SENT_TOTALLY_n
call fcn.00413df9
add esp, 0x10
cmp esi, dword [ebp - 0x18]
lea eax, [ebp - 0x274]
sete byte [ebp - 0xd]
cmp dword [ebp - 0x278], eax
je 0x42293f
push dword [ebp - 0x278]
call fcn.0049b145
pop ecx
push ebx
push edi
lea ecx, [ebp - 0x58]
call fcn.004017de
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret