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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov ebx, ecx
xor ecx, ecx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], ecx
cmp dword [ebx + 0x7c], ecx
jbe 0x40e316
mov eax, dword [ebx + 0x78]
mov esi, dword [eax]
cmp esi, eax
je 0x40e316
mov eax, dword [esi + 8]
cmp byte [eax + 0x30], 0
je 0x40e300
add eax, 0x18
cmp dword [eax + 0x14], 0x10
jb 0x40e2ca
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
lea ebx, [eax + 0x1800]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
jmp 0x40e305
mov ebx, 0x2000
mov esi, dword [esi]
add ecx, ebx
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0xc], ecx
cmp esi, dword [ebx + 0x78]
jne 0x40e2b6
xor edi, edi
mov esi, dword [ebp + 8]
lea eax, [ecx + 1]
mov dword [ebp - 0x1c], eax
cmp dword [esi], 0
je 0x40e32f
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, esi
mov dword [ecx], eax
cmp dword [ebx + 0x7c], 0
jbe 0x40e4e5
mov eax, dword [ebx + 0x78]
mov esi, dword [eax]
mov dword [ebp - 0x14], esi
cmp esi, eax
je 0x40e4e5
nop dword [eax]
mov ebx, dword [esi + 8]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ecx]
sub edx, edi
mov eax, dword [ebx + 0x2c]
add ecx, edi
cmp byte [ebx + 0x30], 0
lea edi, [ebx + 0x18]
mov dword [ebp - 0xc], ecx
je 0x40e480
mov ecx, edi
cmp eax, 0x10
jb 0x40e388
mov ecx, dword [edi]
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x40e392
mov eax, dword [ebx]
push ecx
push eax
push dword [ebp + 0xc]
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_n_r_n
push edx
push dword [ebp - 0xc]
call fcn.0040fcf0
mov ecx, dword [ebp + 0xc]
add esp, 0x18
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e3b0
mov eax, dword [ebx + 0x28]
sub ecx, edx
add eax, 0x3c
add eax, dword [ebx + 0x10]
add eax, ecx
cmp dword [edi + 0x14], 0x10
mov dword [ebp - 4], eax
jb 0x40e3cf
mov edi, dword [edi]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
test ebx, ebx
je 0x40e4c6
cmp ebx, 0xffffffff
je 0x40e4c6
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor edi, edi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
lea ecx, [ebp - 8]
add eax, dword [ebp - 0xc]
push edi
push ecx
push 0x400
push eax
push ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40e45e
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 8]
test eax, eax
je 0x40e45b
cmp edi, esi
ja 0x40e45b
add edi, eax
lea eax, [ebp - 8]
push 0
push eax
mov eax, dword [ebp - 0x24]
push 0x400
add eax, edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40e432
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov edx, 0xa0d
mov ecx, dword [ebp - 4]
add eax, edi
push ebx
mov word [eax + ecx], dx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
add eax, 2
add eax, edi
jmp 0x40e4c9
cmp eax, 0x10
jb 0x40e487
mov edi, dword [edi]
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x40e491
mov eax, dword [ebx]
push edi
mov edi, dword [ebp + 0xc]
push eax
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
push edx
push ecx
call fcn.0040fcf0
mov ecx, edi
add esp, 0x18
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e4b0
mov eax, dword [ebx + 0x28]
sub ecx, edx
add eax, 0x31
add eax, dword [ebx + 0x10]
add eax, ecx
jmp 0x40e4c9
mov eax, dword [ebp - 4]
mov edi, dword [ebp - 0x10]
mov esi, dword [esi]
add edi, eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], esi
cmp esi, dword [eax + 0x78]
jne 0x40e360
mov eax, dword [ecx]
mov ecx, 0x2d2d
mov ebx, dword [ebp + 0xc]
mov word [edi + eax], cx
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e4f8
mov esi, dword [ebp + 8]
sub ecx, edx
push ecx
push ebx
mov eax, dword [esi]
add eax, 2
add eax, edi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, ebx
add esp, 0xc
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e520
mov eax, dword [esi]
sub ecx, edx
add eax, ecx
lea ecx, [ebx + 1]
mov dword [eax + edi + 2], 0xa0d2d2d
mov al, byte [ebx]
inc ebx
test al, al
jne 0x40e538
lea eax, [edi + 6]
sub ebx, ecx
pop edi
pop esi
add eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8