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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x42c
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
push esi
mov esi, ecx
push edi
mov dword [esp + 0x24], esi
je 0x403ccb
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebx], 0
mov ecx, esi
call fcn.00403ae0
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push eax
push 0x40
call edi
mov dword [ebx], eax
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
xor ecx, ecx
cmp eax, edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
jae 0x403eee
lea esi, [eax + 0x100]
mov dword [esp + 0x20], esi
jmp 0x403d13
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, dword [esp + 0x20]
xor ecx, ecx
mov eax, dword [esi + 0x400]
xor ebx, ebx
dec eax
je 0x403e5a
dec eax
jne 0x403e8f
push ecx
push 0x8000080
push 3
push ecx
push 1
push 0x80000000
push esi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x28], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x2c], eax
add eax, 0x1801
push eax
push 0x40
call edi
mov ebx, eax
xor eax, eax
mov byte [esp + 0x30], 0
mov ecx, 0x100
lea edi, [esp + 0x31]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x24]
push esi
call fcn.00403420
mov ecx, dword [ebp + 0xc]
push eax
mov eax, dword [esp + 0x14]
push esi
push eax
push ecx
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_nContent_Type:__s_r_n_r_n
push ebx
call fcn.0040aa2b
mov eax, ebx
add esp, 0x18
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403da0
mov ecx, dword [esp + 0x1c]
push 0
sub eax, esi
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x30], eax
push 0x400
lea eax, [esp + 0x3c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403e35
lea ecx, [ecx]
mov ecx, dword [esp + 0x14]
test ecx, ecx
jbe 0x403e35
mov edx, dword [esp + 0xc]
cmp edx, dword [esp + 0x2c]
ja 0x403e35
mov eax, dword [esp + 0x28]
lea edi, [eax + edx]
mov eax, ecx
shr ecx, 2
add edi, ebx
lea esi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x14]
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
push 0
add edx, esi
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x14], edx
push 0x400
lea edx, [esp + 0x3c]
stosb byte es:[edi], al
mov eax, dword [esp + 0x28]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403dd0
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x1c]
lea esi, [ecx + edx]
push eax
mov word [esi + ebx], 0xa0d
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 2
mov dword [esp + 0xc], esi
jmp 0x403e8f
push 0x2000
push 0x40
call edi
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 0xc]
push esi
push ecx
push edx
mov ebx, eax
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
push ebx
call fcn.0040aa2b
mov eax, ebx
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403e82
sub eax, edx
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov edi, dword [eax]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x18]
mov edx, ecx
shr ecx, 2
add edi, eax
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
add eax, ecx
test ebx, ebx
mov dword [esp + 0x18], eax
je 0x403ec1
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 0xc]
add eax, 0x504
add esi, 0x504
cmp eax, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], esi
jb 0x403d07
mov ebx, dword [ebp + 8]
mov edx, dword [ebx]
mov eax, dword [esp + 0x18]
mov word [eax + edx], 0x2d2d
mov edx, dword [ebp + 0xc]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403f02
sub eax, esi
mov ecx, eax
mov eax, dword [ebx]
mov ebx, dword [esp + 0x18]
lea edi, [eax + ebx + 2]
mov eax, ecx
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, edx
rep movsb byte es:[edi], byte [esi]
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403f30
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
sub eax, esi
add ecx, eax
mov eax, edx
mov dword [ecx + ebx + 2], 0xa0d2d2d
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403f50
pop edi
sub eax, edx
pop esi
lea eax, [eax + ebx + 5]
pop ebx
mov esp, ebp
pop ebp
ret 8