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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, eax
cmp byte [esi + 0x38], 0
push edi
je 0x40ee17
cmp dword [esi + 0x34], 0x10
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
jb 0x40ed27
mov ecx, dword [esi + 0x20]
jmp 0x40ed2a
lea ecx, [esi + 0x20]
cmp dword [esi + 0x18], 0x10
jb 0x40ed35
mov eax, dword [esi + 4]
jmp 0x40ed38
lea eax, [esi + 4]
push ecx
push eax
mov edi, str.__MULTI_PARTS_FORM_DATA_BOUNDARY_AAAA
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_n_r_n
lea eax, [ebp - 0xc]
call fcn.0040da80
add esp, 0x10
lea eax, [edi + 1]
mov cl, byte [edi]
inc edi
test cl, cl
jne 0x40ed53
sub edi, eax
mov eax, dword [esi + 0x30]
add eax, dword [esi + 0x14]
cmp dword [esi + 0x34], 0x10
lea edi, [eax + edi + 0x3c]
jb 0x40ed71
mov eax, dword [esi + 0x20]
jmp 0x40ed74
lea eax, [esi + 0x20]
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp eax, esi
je 0x40eef1
cmp eax, 0xffffffff
je 0x40eef1
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov dword [ebp - 0x10], eax
lea eax, [edi + ebx]
lea ecx, [ebp - 4]
push ecx
mov ebx, 0x400
push ebx
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push eax
jmp 0x40edec
cmp dword [ebp - 4], 0
jbe 0x40edf5
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x10]
ja 0x40edf8
add ecx, dword [ebp - 4]
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
add eax, edi
mov dword [ebp - 8], ecx
push ebx
add ecx, eax
push ecx
push dword [ebp - 0xc]
call esi
test eax, eax
jne 0x40edc9
mov ecx, dword [ebp - 8]
push dword [ebp - 0xc]
add edi, ecx
mov ecx, dword [ebp + 8]
mov eax, 0xa0d
mov word [edi + ecx], ax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, 2
jmp 0x40eef1
cmp dword [esi + 0x3c], 0
je 0x40eea1
cmp dword [esi + 0x40], 0
je 0x40eea1
cmp dword [esi + 0x34], 0x10
mov ebx, dword [ebp + 8]
mov dword [ebp + 8], ebx
jb 0x40ee38
mov ecx, dword [esi + 0x20]
jmp 0x40ee3b
lea ecx, [esi + 0x20]
cmp dword [esi + 0x18], 0x10
jb 0x40ee46
mov eax, dword [esi + 4]
jmp 0x40ee49
lea eax, [esi + 4]
push ecx
push eax
mov edi, str.__MULTI_PARTS_FORM_DATA_BOUNDARY_AAAA
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_n_r_n
lea eax, [ebp + 8]
call fcn.0040da80
add esp, 0x10
lea eax, [edi + 1]
mov cl, byte [edi]
inc edi
test cl, cl
jne 0x40ee64
push dword [esi + 0x40]
sub edi, eax
mov eax, dword [esi + 0x30]
add eax, dword [esi + 0x14]
push dword [esi + 0x3c]
lea edi, [eax + edi + 0x3c]
lea eax, [edi + ebx]
push eax
call fcn.00414d40
mov ecx, dword [esi + 0x40]
lea eax, [edi + ebx]
mov edx, 0xa0d
mov word [eax + ecx], dx
mov eax, dword [esi + 0x40]
add esp, 0xc
lea edi, [edi + eax + 2]
jmp 0x40eef1
cmp dword [esi + 0x34], 0x10
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
jb 0x40eeb2
mov ecx, dword [esi + 0x20]
jmp 0x40eeb5
lea ecx, [esi + 0x20]
cmp dword [esi + 0x18], 0x10
jb 0x40eec0
mov eax, dword [esi + 4]
jmp 0x40eec3
lea eax, [esi + 4]
push ecx
push eax
mov edi, str.__MULTI_PARTS_FORM_DATA_BOUNDARY_AAAA
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
lea eax, [ebp + 8]
call fcn.0040da80
add esp, 0x10
lea eax, [edi + 1]
mov cl, byte [edi]
inc edi
test cl, cl
jne 0x40eede
sub edi, eax
mov eax, dword [esi + 0x30]
add eax, dword [esi + 0x14]
lea edi, [eax + edi + 0x31]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 4