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

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebx, ecx
mov al, byte [ebx + 0x38]
test al, al
push esi
push edi
je 0x41042d
mov eax, dword [ebx + 0x34]
mov edi, 0x10
cmp eax, edi
jb 0x410335
mov ecx, dword [ebx + 0x20]
jmp 0x410338
lea ecx, [ebx + 0x20]
cmp dword [ebx + 0x18], edi
jb 0x410342
mov eax, dword [ebx + 4]
jmp 0x410345
lea eax, [ebx + 4]
mov esi, dword [esp + 0x24]
mov ebp, dword [esp + 0x1c]
push ecx
push eax
push esi
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_n_r_n
push ebp
call fcn.00414b24
mov eax, esi
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410363
mov ecx, dword [ebx + 0x30]
sub eax, edx
add ecx, dword [ebx + 0x14]
lea esi, [ecx + eax + 0x3c]
cmp dword [ebx + 0x34], edi
mov dword [esp + 0x14], esi
jb 0x410384
mov ebx, dword [ebx + 0x20]
jmp 0x410387
add ebx, 0x20
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
test edi, edi
je 0x41052f
cmp edi, 0xffffffff
je 0x41052f
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ebx, [esi + ebp]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
xor esi, esi
push esi
lea edx, [esp + 0x28]
push edx
push 0x400
push ebx
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x38], esi
call ebp
test eax, eax
je 0x410409
mov eax, dword [esp + 0x24]
test eax, eax
jbe 0x410409
cmp esi, dword [esp + 0x10]
ja 0x410409
push 0
add esi, eax
lea eax, [esp + 0x28]
push eax
push 0x400
lea ecx, [esi + ebx]
push ecx
push edi
call ebp
test eax, eax
jne 0x4103e2
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
add esi, edx
push edi
mov word [esi + eax], 0xa0d
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
lea eax, [esi + 2]
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4104cb
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x4104cb
mov eax, dword [ebx + 0x34]
mov edi, 0x10
cmp eax, edi
jb 0x410454
mov ecx, dword [ebx + 0x20]
jmp 0x410457
lea ecx, [ebx + 0x20]
cmp dword [ebx + 0x18], edi
jb 0x410461
mov eax, dword [ebx + 4]
jmp 0x410464
lea eax, [ebx + 4]
mov esi, dword [esp + 0x24]
mov ebp, dword [esp + 0x1c]
push ecx
push eax
push esi
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_n_r_n
push ebp
call fcn.00414b24
mov eax, esi
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410482
mov esi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x30]
add ecx, esi
mov esi, dword [ebx + 0x3c]
sub eax, edx
lea eax, [ecx + eax + 0x3c]
mov ecx, dword [ebx + 0x40]
mov edx, ecx
shr ecx, 2
lea edi, [eax + ebp]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx + 0x40]
lea ecx, [eax + ebp]
pop edi
pop esi
mov word [ecx + edx], 0xa0d
mov ecx, dword [ebx + 0x40]
pop ebp
lea eax, [eax + ecx + 2]
pop ebx
add esp, 8
ret 0xc
mov eax, dword [ebx + 0x34]
mov edi, 0x10
cmp eax, edi
jb 0x4104dc
mov ecx, dword [ebx + 0x20]
jmp 0x4104df
lea ecx, [ebx + 0x20]
cmp dword [ebx + 0x18], edi
jb 0x4104e9
mov eax, dword [ebx + 4]
jmp 0x4104ec
lea eax, [ebx + 4]
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
push ecx
push eax
push esi
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
push edx
call fcn.00414b24
mov eax, esi
add esp, 0x14
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410510
mov ecx, dword [ebx + 0x30]
pop edi
sub eax, edx
mov edx, dword [ebx + 0x14]
pop esi
add ecx, edx
pop ebp
lea eax, [ecx + eax + 0x31]
pop ebx
add esp, 8
ret 0xc
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc