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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x18
lea eax, [esp + 8]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x473f25
mov ebx, dword [esp + 8]
mov eax, dword [esp + 0xc]
cmp ebx, 1
sbb eax, 0
jl 0x473f35
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
test eax, eax
je 0x473fad
mov ecx, dword [edx + 4]
not ecx
add ecx, eax
mov edi, ebx
sub edi, ecx
jbe 0x474141
add edi, eax
push edi
push dword [edx + 8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
mov edx, dword [ebp + 0xc]
add esp, 8
mov dword [edx + 8], eax
jmp 0x47413f
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov ebx, dword [edx + 4]
test eax, eax
je 0x473f4c
mov ecx, ebx
not ecx
add ecx, eax
cmp ecx, 0x1e
ja 0x473f82
cmp eax, 2
mov ecx, 0x20
cmovae ecx, eax
lea edx, [ebx + 0x20]
nop word [eax + eax]
mov edi, ecx
add ecx, ecx
cmp edx, edi
ja 0x473f60
test eax, eax
je 0x473f86
push edi
mov esi, dword [ebp + 0xc]
push dword [esi + 8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
mov edx, esi
add esp, 8
mov dword [esi + 8], eax
jmp 0x473ff7
mov edi, eax
jmp 0x473ffd
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
test ebx, ebx
je 0x473fee
inc ebx
push ebx
mov ebx, dword [ebp + 0xc]
push dword [ebx + 8]
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edx, ebx
add esp, 0xc
mov dword [ebx + 8], esi
jmp 0x473ff7
mov esi, dword [edx + 4]
mov eax, ebx
or eax, esi
je 0x47411d
lea edi, [esi + ebx]
inc edi
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ecx, eax
test esi, esi
je 0x474136
inc esi
push esi
mov eax, dword [ebp + 0xc]
push dword [eax + 8]
push ecx
mov esi, ecx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov ecx, esi
mov edx, dword [ebp + 0xc]
add esp, 0xc
jmp 0x47413c
mov byte [esi], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 8], esi
mov dword [edx], edi
test edi, edi
je 0x474008
mov eax, dword [edx + 4]
mov esi, eax
not esi
add esi, edi
jmp 0x47400d
mov eax, dword [edx + 4]
xor esi, esi
mov dword [esp + 4], 0
add eax, dword [edx + 8]
lea ecx, [esp + 4]
push 0
push ecx
push esi
push eax
jmp 0x47403e
xor esi, esi
add ebx, dword [edx + 8]
push 0
lea eax, [esp + 8]
push eax
push esi
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x47411a
mov ecx, dword [esp + 4]
test ecx, ecx
je 0x47411a
mov edx, dword [ebp + 0xc]
mov ebx, dword [edx + 4]
add ebx, ecx
mov dword [edx + 4], ebx
mov eax, dword [edx]
cmp ecx, esi
jne 0x4740c0
test eax, eax
je 0x47407d
lea ecx, [eax - 1]
mov edx, ebx
not edx
add edx, eax
cmp edx, ecx
jae 0x4740cb
cmp eax, 2
mov ecx, eax
mov edx, 0x20
cmovb ecx, edx
lea edx, [eax + ebx]
nop dword [eax]
mov edi, ecx
add ecx, ecx
cmp edx, edi
ja 0x474090
test eax, eax
je 0x4740d0
push edi
mov esi, dword [ebp + 0xc]
push dword [esi + 8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
mov edx, esi
add esp, 8
mov esi, eax
mov ebx, dword [edx + 4]
jmp 0x474100
mov edi, eax
test edi, edi
jne 0x47410d
jmp 0x474030
mov edx, dword [ebp + 0xc]
jmp 0x47410f
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
test ebx, ebx
je 0x4740f7
lea eax, [ebx + 1]
push eax
mov eax, dword [ebp + 0xc]
push dword [eax + 8]
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edx, dword [ebp + 0xc]
add esp, 0xc
jmp 0x474100
mov byte [esi], 0
xor ebx, ebx
mov edx, dword [ebp + 0xc]
nop
mov dword [edx + 8], esi
mov dword [edx], edi
test edi, edi
je 0x474030
mov eax, edi
mov esi, ebx
not esi
add esi, eax
jmp 0x474032
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
mov ecx, dword [edx + 8]
mov byte [ecx + eax], 0
cmp dword [edx + 4], 0
setne al
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov byte [ecx], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 8], ecx
mov dword [edx], edi
mov dword [esp + 4], 0
test ebx, ebx
je 0x47411d
mov eax, dword [edx + 4]
lea esi, [esp + 4]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
nop word [eax + eax]
add eax, dword [edx + 8]
push 0
push esi
push ebx
push eax
push dword [ebp + 8]
call edi
mov edx, dword [ebp + 0xc]
test eax, eax
je 0x47411d
mov ecx, dword [esp + 4]
test ecx, ecx
je 0x47411d
mov eax, dword [edx + 4]
add eax, ecx
mov dword [edx + 4], eax
sub ebx, ecx
jne 0x474160
jmp 0x47411d