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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
mov ebx, dword [ebp + 8]
cmp byte [ebx + 0x107], 0
push esi
push edi
je 0x4f2038
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
lea eax, [ebp - 0x20]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4f1eb2
mov dword [ebp - 0xc], eax
jmp 0x4f1ebb
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 1
lea edx, [ebp - 0x28]
push edx
xor eax, eax
push eax
push eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
call edi
test eax, eax
jne 0x4f1ede
xor ecx, ecx
jmp 0x4f1ee4
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0xc]
ja 0x4f22a0
jb 0x4f1ef8
cmp ecx, dword [ebp - 0x10]
jae 0x4f22a0
mov eax, dword [ebx + 0x11]
sub eax, dword [ebx + 0xd]
jns 0x4f1f03
add eax, dword [ebx + 5]
movzx esi, byte [ebx + 0x35]
push 1
lea edx, [ebp - 0x30]
push edx
xor ecx, ecx
shr esi, 3
add esi, eax
push ecx
xor eax, eax
push eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
call edi
test eax, eax
je 0x4f1f6f
mov edx, dword [ebp - 0x2c]
xor eax, eax
cmp edx, eax
jb 0x4f1f6f
ja 0x4f1f36
mov eax, dword [ebp - 0x30]
cmp eax, esi
jbe 0x4f1f6f
push 1
lea edx, [ebp - 0x38]
push edx
xor ecx, ecx
push ecx
xor eax, eax
push eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
call edi
test eax, eax
jne 0x4f1f5b
xor ecx, ecx
sub eax, esi
mov edx, ecx
sbb ecx, edx
mov dword [ebp - 0x1c], ecx
jmp 0x4f1f74
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
sub eax, esi
mov edx, 0
sbb ecx, edx
mov dword [ebp - 0x1c], ecx
jmp 0x4f1f74
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x11]
sub eax, dword [ebx + 0xd]
jns 0x4f1f82
add eax, dword [ebx + 5]
cmp eax, 0x20
jae 0x4f1fad
mov eax, dword [ebx + 1]
mov ecx, dword [ebp + 0xc]
push 0
lea edx, [ebp - 0x14]
push edx
mov edx, dword [ecx]
push 0x20
push eax
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebx + 1]
push 0x20
push eax
lea esi, [ebx + 5]
call fcn.0055ca1c
push 8
lea ecx, [ebp + 8]
lea edi, [ebx + 1]
push ecx
mov dword [ebp + 8], 0
call fcn.0049c687
test al, al
je 0x4f22a0
cmp dword [ebp + 8], 0xff
jne 0x4f1ebe
push 8
lea edx, [ebp + 8]
push edx
call fcn.0049c687
test al, al
je 0x4f22a0
mov eax, dword [ebp + 8]
and eax, 0xfffffffe
cmp eax, 0xf8
jne 0x4f1ebe
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
push 0
push 0
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [ebx + 0x11]
xor eax, eax
mov dword [ebx + 0xd], ecx
mov dword [ebx + 0x15], eax
mov dword [ebx + 0x19], eax
mov dword [ebx + 0x1d], eax
mov dword [ebx + 0x21], eax
mov dword [ebx + 0x25], eax
mov dword [ebx + 0x29], eax
mov dword [ebx + 0x2d], eax
mov dword [ebx + 0x31], eax
mov byte [ebx + 0x35], al
jmp 0x4f203b
mov edi, dword [ebp + 0xc]
mov eax, dword [ebx + 0x11]
sub eax, dword [ebx + 0xd]
jns 0x4f2046
add eax, dword [ebx + 5]
cmp eax, 0x20
jae 0x4f206e
mov eax, dword [ebx + 1]
mov ecx, dword [edi]
push 0
lea edx, [ebp + 8]
push edx
push 0x20
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebx + 1]
push 0x20
push edx
lea esi, [ebx + 5]
call fcn.0055ca1c
lea esi, [ebx + 0x46]
lea eax, [ebx + 1]
push esi
call fcn.004f3a20
cmp byte [esi], 0
jne 0x4f208f
mov byte [ebx + 0x107], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 0x11]
sub eax, dword [ebx + 0xd]
jns 0x4f209a
add eax, dword [ebx + 5]
cmp eax, 0x7fff
ja 0x4f2127
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
lea eax, [ebp - 0x38]
push eax
push edx
mov edi, 0x7fff
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4f20c5
xor esi, esi
mov dword [ebp - 0x2c], esi
jmp 0x4f20ce
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x2c], eax
push 1
lea edx, [ebp - 0x30]
push edx
xor ecx, ecx
push ecx
xor eax, eax
push eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x4f20ef
mov dword [ebp - 0x34], eax
jmp 0x4f20f8
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], edx
sub esi, eax
cmp esi, edi
jae 0x4f2100
mov edi, esi
mov ecx, dword [ebx + 1]
mov edx, dword [ebp + 0xc]
push 0
lea eax, [ebp + 8]
push eax
mov eax, dword [edx]
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebx + 1]
push edi
push ecx
lea esi, [ebx + 5]
call fcn.0055ca1c
mov edi, dword [ebp + 0xc]
mov eax, dword [ebx + 0x48]
mov dl, byte [ebx + 0x52]
mov cl, byte [ebx + 0x51]
mov dword [ebp - 0x14], eax
xor al, al
cmp byte [ebx + 0xa4], al
mov byte [ebp + 0xb], dl
mov byte [ebp - 1], cl
mov byte [ebp + 0xf], al
jbe 0x4f21f4
movzx ecx, cl
mov dword [ebp - 0xc], ecx
jmp 0x4f2155
mov al, byte [ebp + 0xf]
mov ecx, dword [ebp - 0xc]
sub ecx, 1
je 0x4f2198
sub ecx, 1
je 0x4f217c
sub ecx, 1
je 0x4f2198
movzx esi, al
mov eax, dword [ebx + 0x9c]
imul esi, esi, 0x40116
mov byte [esi + eax + 7], dl
jmp 0x4f21b2
movzx esi, al
imul esi, esi, 0x40116
test al, al
sete cl
add cl, dl
mov edx, dword [ebx + 0x9c]
mov byte [esi + edx + 7], cl
jmp 0x4f21b2
mov ecx, dword [ebx + 0x9c]
movzx esi, al
imul esi, esi, 0x40116
cmp al, 1
sete al
add al, dl
mov byte [esi + ecx + 7], al
mov ecx, dword [ebx + 0x9c]
push edi
lea eax, [ebx + 1]
push eax
add ecx, esi
lea eax, [ebx + 0x46]
call fcn.004f40c0
test al, al
sete al
test al, al
mov byte [ebx + 0x107], al
jne 0x4f22a0
mov al, byte [ebp + 0xf]
mov dl, byte [ebp + 0xb]
add al, 1
cmp al, byte [ebx + 0xa4]
mov byte [ebp + 0xf], al
jb 0x4f2152
mov cl, byte [ebp - 1]
cmp dl, 8
je 0x4f2213
cmp dl, 0x10
je 0x4f220b
cmp dl, 0x18
jne 0x4f2223
push ebx
call fcn.004f2870
jmp 0x4f2223
fld dword [0x60d420]
jmp 0x4f2219
fld dword [0x60d418]
push ecx
fstp dword [esp]
push ebx
call fcn.004f22b0
cmp byte [ebx + 0x107], 0
je 0x4f2270
cmp byte [ebx + 0xa4], 0
mov byte [ebp + 0xf], 0
jbe 0x4f2270
mov esi, dword [ebp - 0x14]
add esi, esi
add esi, esi
movzx edx, byte [ebp + 0xf]
mov eax, dword [ebx + 0x9c]
imul edx, edx, 0x40116
mov ecx, dword [edx + eax + 0x10]
push esi
push 0
push ecx
call fcn.005970f0
mov al, byte [ebp + 0xf]
add al, 1
add esp, 0xc
cmp al, byte [ebx + 0xa4]
mov byte [ebp + 0xf], al
jb 0x4f2240
movzx edx, byte [ebx + 0x35]
and dl, 7
add dl, 0x10
lea eax, [ebp + 0xc]
lea edi, [ebx + 1]
mov dword [ebp + 0xc], 0
push edx
push eax
call fcn.0049c687
mov cx, word [ebp + 0xc]
mov dx, cx
mov ah, dl
mov al, dh
mov word [ebx + 0xa5], ax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8