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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x1011b040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + 0x30]
test ecx, ecx
je 0x10049a3c
mov ecx, dword [ebp - 8]
add ecx, 0x18
call fcn.1000d8c0
push eax
mov ecx, dword [ebp - 8]
call fcn.1000d8c0
push eax
mov edx, dword [ebp + 0x10]
push edx
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_n_r_n
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR120.dll_sprintf_s]
add esp, 0x18
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x20]
mov dl, byte [ecx]
mov byte [ebp - 0xf], dl
add dword [ebp - 0x20], 1
cmp byte [ebp - 0xf], 0
jne 0x100498a8
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x54]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 8]
call fcn.1000b3e0
mov ecx, dword [ebp - 0x44]
lea esi, [ecx + eax + 0x2a]
mov ecx, dword [ebp - 8]
add ecx, 0x18
call fcn.1000b3e0
lea edx, [esi + eax + 0x12]
mov dword [ebp - 0xc], edx
call fcn.1002cc50
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 8]
add ecx, 0x18
call fcn.1000d8c0
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x10049909
mov dword [ebp - 0x38], 0
jmp 0x10049979
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x18]
mov al, byte [edx]
mov byte [ebp - 0xd], al
add dword [ebp - 0x18], 1
cmp byte [ebp - 0xd], 0
jne 0x10049918
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
add edx, 1
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x2c], 0x3fffffff
jle 0x1004994e
mov dword [ebp - 0x34], 0
jmp 0x10049973
mov eax, dword [ebp - 0x2c]
shl eax, 1
call fcn.100ed140
mov dword [ebp - 0x40], esp
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x40]
push eax
call fcn.100492f0
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], ecx
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x10049a3a
cmp dword [ebp - 0x1c], 0xffffffff
je 0x10049a3a
push 0
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0xc]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x14], 0
push 0
lea edx, [ebp - 0x28]
push edx
push 0x400
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10049a0b
cmp dword [ebp - 0x28], 0
jbe 0x10049a0b
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp - 0x50]
ja 0x10049a0b
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
jmp 0x100499d2
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
mov ax, word [0x10100cf4]
mov word [edx + ecx], ax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
add eax, 2
mov dword [ebp - 0xc], eax
jmp 0x10049ab6
mov ecx, dword [ebp - 8]
add ecx, 0x18
call fcn.1000d8c0
push eax
mov ecx, dword [ebp - 8]
call fcn.1000d8c0
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR120.dll_sprintf_s]
add esp, 0x18
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x24]
mov cl, byte [eax]
mov byte [ebp - 0xe], cl
add dword [ebp - 0x24], 1
cmp byte [ebp - 0xe], 0
jne 0x10049a7a
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x58]
mov dword [ebp - 0x60], edx
mov ecx, dword [ebp - 8]
call fcn.1000b3e0
mov ecx, dword [ebp - 0x60]
lea esi, [ecx + eax + 0x2a]
mov ecx, dword [ebp - 8]
add ecx, 0x18
call fcn.1000b3e0
lea edx, [esi + eax + 7]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
lea esp, [ebp - 0x64]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100ec36e
mov esp, ebp
pop ebp
ret 0xc