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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 8
push ebx
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
test ebx, ebx
je 0x4c7266
cmp ebx, 0xffffffff
je 0x4c7266
push esi
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4c7249
cmp esi, dword [ebp + 0xc]
jae 0x4c7249
lea ecx, [esi + 5]
push edi
push ecx
call fcn.0044c4d0
mov edi, eax
add esp, 4
test edi, edi
jne 0x4c7034
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [edi - 3]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea edx, [ebp - 4]
push edx
push esi
push edi
mov byte [edi + esi], 0
mov byte [edi + esi + 1], 0
mov byte [edi + esi + 2], 0
mov byte [edi + esi + 3], 0
mov byte [edi + esi + 4], 0
push ebx
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
push ebx
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0
je 0x4c7234
cmp dword [ebp - 4], esi
jne 0x4c7234
mov ecx, dword [ebp + 0x1c]
mov dl, 0xbb
mov bl, 0xbf
cmp ecx, 0xfde9
je 0x4c7186
mov al, byte [edi]
cmp al, 0xef
jne 0x4c70b1
cmp byte [edi + 1], dl
jne 0x4c70b1
cmp byte [edi + 2], bl
je 0x4c7186
mov dl, 0xfe
cmp ecx, 0x4b0
je 0x4c7120
cmp al, 0xff
jne 0x4c70c4
cmp byte [edi + 1], dl
je 0x4c7120
lea edx, [esi + 2]
push 2
push edx
call fcn.0044c490
mov edx, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x10]
add esp, 8
lea ecx, [esi + 1]
push ecx
push eax
push esi
push edi
push 0
push edx
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jl 0x4c70f6
cmp eax, esi
jle 0x4c71f0
push edi
call fcn.0044c4f0
mov eax, dword [ebx]
add esp, 4
test eax, eax
je 0x4c7114
push eax
call fcn.0044c4f0
add esp, 4
mov dword [ebx], 0
pop edi
pop esi
mov eax, 0xfffffff8
pop ebx
mov esp, ebp
pop ebp
ret
cmp al, 0xff
jne 0x4c7129
cmp byte [edi + 1], dl
je 0x4c713e
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
shr esi, 1
mov dword [edx], edi
pop edi
mov dword [eax], esi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [edi + 2]
push 0
push ecx
add esi, 0xfffffffe
call fcn.0044c570
mov edx, dword [ebp + 0x10]
add esp, 8
mov dword [edx], eax
test eax, eax
jne 0x4c716d
push edi
call fcn.0044c4f0
add esp, 4
pop edi
pop esi
mov eax, 0xfffffff9
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x14]
shr esi, 1
push edi
mov dword [eax], esi
call fcn.0044c4f0
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [edi], 0xef
jne 0x4c7199
cmp byte [edi + 1], dl
jne 0x4c7199
cmp byte [edi + 2], bl
jne 0x4c7199
mov bl, 1
jmp 0x4c719b
xor bl, bl
lea ecx, [esi + 2]
push 2
push ecx
call fcn.0044c490
mov edx, dword [ebp + 0x10]
add esp, 8
mov dword [edx], eax
test eax, eax
jne 0x4c71c7
push edi
call fcn.0044c4f0
add esp, 4
pop edi
pop esi
mov eax, 0xfffffffb
pop ebx
mov esp, ebp
pop ebp
ret
movzx ecx, bl
push esi
neg ecx
push eax
sbb ecx, ecx
and ecx, 3
mov eax, esi
sub eax, ecx
push eax
add ecx, edi
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jl 0x4c7207
cmp eax, esi
jg 0x4c7207
mov ecx, dword [ebp + 0x14]
push edi
mov dword [ecx], eax
call fcn.0044c4f0
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.0044c4f0
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
add esp, 4
test eax, eax
je 0x4c7228
push eax
call fcn.0044c4f0
add esp, 4
mov dword [esi], 0
pop edi
pop esi
mov eax, 0xfffffffa
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.0044c4f0
add esp, 4
pop edi
pop esi
mov eax, 0xfffffffc
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0x18]
push ebx
mov dword [edx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, 0xfffffffe
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret