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

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0xc], ebx
call fcn.00402250
mov ebp, dword [esp + 0x28]
inc eax
cmp dword [ebp], 0
je 0x40231d
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret 8
push edi
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp], eax
mov eax, dword [esi + 0x60]
test eax, eax
jbe 0x4024c2
mov esi, dword [esi + 0x5c]
mov eax, dword [esi]
cmp eax, esi
mov dword [esp + 0x18], eax
je 0x4024c2
jmp 0x402353
mov eax, dword [esp + 0x18]
mov esi, dword [eax + 8]
mov ebp, dword [ebp]
add ebp, ebx
mov al, byte [esi + 0x20]
mov ecx, dword [esi + 0x14]
test al, al
mov dword [esp + 0x20], ebp
je 0x402459
test ecx, ecx
jne 0x402376
mov ecx, 0x42c5d0
mov eax, dword [esi + 4]
test eax, eax
jne 0x402382
mov eax, 0x42c5d0
mov edi, dword [esp + 0x30]
push ecx
push eax
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_n_r_n
push ebp
call fcn.00410234
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
mov edx, dword [esi + 0x18]
repne scasb al, byte es:[edi]
mov eax, dword [esi + 8]
mov esi, dword [esi + 0x14]
not ecx
dec ecx
add ecx, edx
test esi, esi
lea ebx, [ecx + eax + 0x3c]
jne 0x4023b9
mov esi, 0x42c5d0
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x402499
cmp esi, 0xffffffff
je 0x402499
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor edi, edi
lea ecx, [esp + 0x14]
push edi
add ebp, ebx
push ecx
push 0x400
push ebp
push esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40243c
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x40243c
cmp edi, dword [esp + 0x1c]
ja 0x40243c
add edi, eax
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [edi + ebp]
push 0x400
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402411
mov edx, dword [esp + 0x20]
mov cx, word [0x4372e8]
add edi, ebx
push esi
mov word [edi + edx], cx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ebx, [edi + 2]
jmp 0x402499
test ecx, ecx
jne 0x402462
mov ecx, 0x42c5d0
mov eax, dword [esi + 4]
test eax, eax
jne 0x40246e
mov eax, 0x42c5d0
mov edi, dword [esp + 0x30]
push ecx
push eax
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
push ebp
call fcn.00410234
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
mov eax, dword [esi + 0x18]
not ecx
dec ecx
add ecx, eax
mov eax, dword [esi + 8]
lea ebx, [ecx + eax + 0x31]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add edx, ebx
mov ebp, dword [esp + 0x2c]
mov eax, dword [ecx]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
cmp eax, dword [edx + 0x5c]
jne 0x40234f
mov eax, dword [ebp]
mov cx, word [0x4372ac]
mov edx, dword [esp + 0x30]
mov word [eax + ebx], cx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [ebp]
mov esi, edx
not ecx
dec ecx
lea edi, [eax + ebx + 2]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov esi, dword [ebp]
mov eax, dword [str.___r_n]
not ecx
dec ecx
mov edi, edx
add ecx, esi
mov dword [ecx + ebx + 2], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
pop esi
pop ebp
lea eax, [ecx + ebx + 6]
pop ebx
add esp, 0x18
ret 8