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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x782c
call fcn.005043d0
mov eax, dword [0x56f360]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov eax, dword [esi]
push edi
xor ebx, ebx
mov edi, edx
mov dword [ebp - 0x7824], esi
mov dword [ebp - 0x7820], edi
cmp eax, ebx
je 0x40255b
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi], ebx
call fcn.00402850
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esi], eax
mov eax, dword [0x5773e4]
mov dword [ebp - 0x780c], ebx
mov dword [ebp - 0x7814], eax
cmp eax, dword [0x5773e8]
jae 0x4027ba
lea edi, [eax + 0x100]
mov dword [ebp - 0x781c], edi
mov eax, dword [edi + 0x2800]
xor esi, esi
dec eax
je 0x402717
dec eax
jne 0x40275b
xor ebx, ebx
push ebx
push 0x8000080
push 3
push ebx
push 1
push SysReAllocString
push edi
mov dword [ebp - 0x7810], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
push ebx
push esi
mov dword [ebp - 0x782c], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x7818], eax
cmp esi, 0xffffffff
jne 0x4025ea
mov dword [ebp - 0x7818], ebx
mov eax, dword [ebp - 0x7818]
add eax, 0x1801
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x7800
mov esi, eax
lea eax, [ebp - 0x7807]
push 0
push eax
mov byte [ebp - 0x7808], bl
call fcn.00500fb0
add esp, 0xc
call fcn.004028e0
mov ecx, dword [ebp - 0x781c]
mov edx, dword [ebp - 0x7814]
push eax
mov eax, dword [ebp - 0x7820]
push ecx
push edx
push eax
mov eax, dword [ebp - 0x7818]
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_nContent_Type:__s_r_n_r_n
add eax, 0x1801
push eax
push esi
call fcn.004fdb20
mov eax, esi
add esp, 0x1c
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402656
push 0
lea ecx, [ebp - 0x7810]
push ecx
push 0x7800
sub eax, edi
mov edi, dword [ebp - 0x782c]
lea edx, [ebp - 0x7808]
push edx
push edi
mov dword [ebp - 0x7828], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4026f6
jmp 0x402690
mov eax, dword [ebp - 0x7810]
test eax, eax
je 0x4026f6
cmp ebx, dword [ebp - 0x7818]
ja 0x4026f6
mov ecx, dword [ebp - 0x7828]
push eax
lea eax, [ebp - 0x7808]
add ecx, ebx
push eax
add ecx, esi
push ecx
call fcn.00503a10
push 0x7801
lea edx, [ebp - 0x7808]
push 0
push edx
call fcn.00500fb0
add ebx, dword [ebp - 0x7810]
add esp, 0x18
push 0
lea eax, [ebp - 0x7810]
push eax
push 0x7800
lea ecx, [ebp - 0x7808]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402690
add ebx, dword [ebp - 0x7828]
mov eax, 0xa0d
push edi
mov word [ebx + esi], ax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x781c]
add ebx, 2
jmp 0x40275b
push 0x2000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [ebp - 0x7814]
mov edx, dword [ebp - 0x7820]
push edi
push ecx
push edx
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
mov esi, eax
push 0x2000
push esi
call fcn.004fdb20
mov eax, esi
add esp, 0x18
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402750
sub eax, edx
mov ebx, eax
mov eax, dword [ebp - 0x7824]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x780c]
push ebx
push esi
push ecx
call fcn.00503a10
add dword [ebp - 0x780c], ebx
add esp, 0xc
test esi, esi
je 0x402785
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x7814]
add eax, 0x2904
add edi, 0x2904
mov dword [ebp - 0x7814], eax
mov dword [ebp - 0x781c], edi
cmp eax, dword [0x5773e8]
jb 0x402594
mov edi, dword [ebp - 0x7820]
mov esi, dword [ebp - 0x7824]
mov edx, dword [esi]
mov ecx, dword [ebp - 0x780c]
mov eax, 0x2d2d
mov word [ecx + edx], ax
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4027d0
sub eax, edx
mov edx, dword [esi]
push eax
mov eax, dword [ebp - 0x780c]
lea ecx, [edx + eax + 2]
push edi
push ecx
call fcn.00503a10
mov eax, edi
add esp, 0xc
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4027f5
mov edx, dword [ebp - 0x780c]
sub eax, ecx
mov ecx, dword [esi]
add ecx, eax
lea eax, [ecx + edx + 2]
mov cx, word [str.___r_n]
mov word [eax], cx
mov cl, byte [0x551016]
mov byte [eax + 2], cl
mov eax, dword [esi]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402824
mov ecx, dword [ebp - 4]
sub eax, esi
pop edi
pop esi
xor ecx, ebp
lea eax, [eax + edx + 5]
pop ebx
call fcn.004fd9f8
mov esp, ebp
pop ebp
ret