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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x6459b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
push edi
mov edi, ecx
mov dword [ebp - 0x428], edi
mov dword [ebp - 0x424], esi
mov dword [ebp - 0x420], ebx
test eax, eax
je 0x4406b3
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi], 0
mov ecx, edi
call fcn.004405f0
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esi], eax
mov edi, dword [edi + 4]
mov eax, dword [ebp - 0x428]
mov dword [ebp - 0x40c], 0
mov dword [ebp - 0x410], edi
cmp edi, dword [eax + 8]
jae 0x440906
lea ebx, [edi + 0x200]
mov dword [ebp - 0x414], ebx
mov eax, dword [ebx + 0x800]
dec eax
je 0x440867
dec eax
jne 0x4408d9
xor edi, edi
push edi
push 0x8000080
push 3
push edi
push 1
push SysReAllocStringLen
push ebx
mov dword [ebp - 0x418], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x42c], eax
add eax, 0x1801
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x400
lea ecx, [ebp - 0x407]
push edi
push ecx
mov esi, eax
mov byte [ebp - 0x408], 0
call fcn.00546d60
mov edx, dword [ebp - 0x414]
mov ecx, dword [ebp - 0x428]
add esp, 0xc
push edx
call fcn.004401f0
mov ecx, dword [ebp - 0x410]
mov edx, dword [ebp - 0x420]
push eax
mov eax, dword [ebp - 0x414]
push eax
push ecx
push edx
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_nContent_Type:__s_r_n_r_n
push esi
call fcn.0054a77d
mov eax, esi
add esp, 0x18
lea ecx, [eax + 2]
lea ecx, [ecx]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4407a0
sub eax, ecx
sar eax, 1
push 0
mov dword [ebp - 0x41c], eax
lea eax, [ebp - 0x418]
push eax
push 0x400
lea ecx, [ebp - 0x408]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x44083b
mov eax, dword [ebp - 0x418]
test eax, eax
je 0x44083b
cmp edi, dword [ebp - 0x42c]
ja 0x44083b
push eax
mov eax, dword [ebp - 0x41c]
lea edx, [ebp - 0x408]
add eax, edi
push edx
add eax, esi
push eax
call fcn.005459b0
push 0x401
lea ecx, [ebp - 0x408]
push 0
push ecx
call fcn.00546d60
add edi, dword [ebp - 0x418]
add esp, 0x18
push 0
lea edx, [ebp - 0x418]
push edx
push 0x400
lea eax, [ebp - 0x408]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4407d5
mov ecx, dword [ebp - 0x41c]
mov dx, word [0x595144]
add ecx, edi
push ebx
mov word [ecx + esi], dx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x41c]
mov ebx, dword [ebp - 0x414]
lea edi, [eax + edi + 2]
jmp 0x4408a3
push 0x2000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [ebp - 0x420]
push ebx
push edi
push ecx
mov esi, eax
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
push esi
call fcn.0054a77d
mov eax, esi
add esp, 0x14
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x440892
sub eax, edx
sar eax, 1
mov edi, eax
test esi, esi
je 0x4408cd
mov edx, dword [ebp - 0x424]
mov eax, dword [edx]
add eax, dword [ebp - 0x40c]
push edi
push esi
push eax
call fcn.005459b0
add dword [ebp - 0x40c], edi
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [ebp - 0x410]
mov esi, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x428]
add edi, 0xa04
add ebx, 0xa04
mov dword [ebp - 0x410], edi
mov dword [ebp - 0x414], ebx
cmp edi, dword [ecx + 8]
jb 0x4406f3
mov ebx, dword [ebp - 0x420]
mov edx, dword [esi]
mov ecx, dword [ebp - 0x40c]
mov eax, 0x2d2d
mov word [ecx + edx], ax
mov eax, ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x440920
sub eax, edx
mov edx, dword [esi]
sar eax, 1
push eax
mov eax, dword [ebp - 0x40c]
lea ecx, [edx + eax + 2]
push ebx
push ecx
call fcn.005459b0
mov eax, ebx
add esp, 0xc
lea edx, [eax + 2]
jmp 0x440950
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x440950
mov cx, word [0x59c278]
sub eax, edx
mov edx, dword [esi]
mov esi, dword [ebp - 0x40c]
sar eax, 1
add edx, eax
lea eax, [edx + esi + 2]
mov word [eax], cx
mov dl, byte [0x59c27a]
mov byte [eax + 2], dl
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x440985
mov ecx, dword [ebp - 4]
sub eax, edx
sar eax, 1
pop edi
lea eax, [eax + esi + 5]
pop esi
xor ecx, ebp
pop ebx
call fcn.00546bde
mov esp, ebp
pop ebp
ret 8