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

Disassembly:
push 0x30
mov eax, 0x52dab1
call fcn.00511cd0
mov dword [ebp - 0x30], edx
mov esi, ecx
lea ecx, [ebp - 0x3c]
call fcn.004a8b56
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x38]
add eax, 0xc
push 0x7c
push esi
mov dword [ebp - 0x1c], eax
call fcn.0050662f
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x489e80
mov dword [ebp - 0x18], ebx
mov byte [ebp - 4], 1
call fcn.004115a3
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x489cb2
push 0x80004005
call fcn.00421572
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
mov eax, edi
mov byte [ebp - 4], 2
sub eax, esi
lea ecx, [ebp - 0x20]
sar eax, 1
push eax
push esi
call fcn.004a709d
mov esi, dword [ebp - 0x20]
lea eax, [edi + 2]
mov dword [ebp - 0x2c], eax
lea edx, [ebp - 0x18]
mov eax, dword [0x768fd8]
push edx
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov edi, eax
test edi, edi
jns 0x489d22
lea ecx, [esi - 0x10]
call fcn.004c9927
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x489d0a
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x489d1b
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, edi
jmp 0x489fdf
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
push dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov edx, eax
or edi, 0xffffffff
mov dword [ebp - 0x34], edx
cmp edx, edi
jne 0x489d75
lea ecx, [esi - 0x10]
call fcn.004c9927
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x489d5b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 4], edi
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x489d6b
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, 0x80004005
jmp 0x489fdf
mov ecx, dword [ebp - 0x28]
push edx
push ecx
mov eax, dword [ecx]
call dword [eax + 0x1c]
mov dword [ebp - 0x2c], eax
mov byte [ebp - 4], 3
lea ecx, [eax + 2]
push ecx
mov ecx, dword [ebp - 0x1c]
call fcn.004a8b1a
mov dword [ebp - 4], 2
jmp 0x489db0
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
test edx, edx
jne 0x489deb
lea ecx, [esi - 0x10]
call fcn.004c9927
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x489dd1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 4], edi
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x489de1
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, 0x8007000e
jmp 0x489fdf
push dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
push edx
push dword [ebp - 0x34]
mov eax, dword [ecx]
push ecx
call dword [eax + 0x24]
mov dword [ebp - 0x28], eax
test eax, eax
jns 0x489e32
lea ecx, [esi - 0x10]
call fcn.004c9927
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x489e1a
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov dword [ebp - 4], edi
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x489e2a
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [ebp - 0x28]
jmp 0x489fdf
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ecx]
mov byte [eax + edx], bl
mov eax, dword [ecx]
mov ecx, dword [ebp - 0x30]
mov byte [eax + edx + 1], bl
mov eax, dword [ebp - 0x38]
mov dword [eax + 0x90], edx
mov eax, dword [ebp - 0x3c]
mov dword [ecx], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x3c], ebx
test ecx, ecx
je 0x489e66
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], ebx
mov dword [ecx], eax
lea ecx, [esi - 0x10]
call fcn.004c9927
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x489e1a
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x489e1a
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x34], esi
or edi, 0xffffffff
mov byte [ebp - 4], 5
cmp esi, edi
jne 0x489ecf
call fcn.0042bd90
push edi
mov esi, eax
mov byte [ebp - 4], bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], edi
mov edx, dword [ebp - 0x3c]
test edx, edx
je 0x489ec8
mov ecx, dword [edx]
push edx
call dword [ecx + 8]
mov eax, esi
jmp 0x489fdf
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [ebp - 0x20], 0
mov dword [ebp - 0x24], eax
je 0x489efa
mov byte [ebp - 4], bl
test esi, esi
je 0x489d5b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x489d5b
cmp eax, edi
jne 0x489f2c
call fcn.0042bd90
mov byte [ebp - 4], bl
mov dword [ebp - 0x34], eax
test esi, esi
je 0x489f14
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], edi
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x489f24
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [ebp - 0x34]
jmp 0x489fdf
mov ecx, dword [ebp - 0x1c]
add eax, 2
push eax
mov byte [ebp - 4], 6
call fcn.004a8b1a
mov dword [ebp - 4], 5
jmp 0x489f5a
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x489f7d
mov byte [ebp - 4], bl
test esi, esi
je 0x489dd1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x489dd1
push ebx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], ebx
push ecx
push dword [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x489efe
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov byte [ecx + eax], bl
mov eax, dword [ebp - 0x24]
mov byte [ecx + eax + 1], bl
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
mov dword [ecx + 0x90], eax
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 4], bl
mov dword [ecx], eax
test esi, esi
je 0x489fd0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x3c]
mov dword [ebp - 4], edi
test ebx, ebx
je 0x489fdd
mov eax, dword [ebx]
push ebx
call dword [eax + 8]
xor eax, eax
call fcn.00511c44
ret