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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6e9931
mov eax, dword fs:[0]
push eax
sub esp, 0x5f0
mov eax, dword [0x7ce4e4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esi + 0x10]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x5d4], ebx
test ecx, ecx
je 0x4a4d79
mov eax, dword [ecx + 4]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0xc]
push ecx
call eax
mov ecx, dword [esi + 0x10]
add esp, 4
test ecx, ecx
jne 0x4a4d63
mov dword [esi + 0x10], 0
cmp byte [esi + 0x1c], 0
mov dword [esi + 0x18], 0
jne 0x4a4f36
push str.ReadConfig
call fcn.004b01d0
add esp, 4
mov dword [ebp - 0x5fc], 0
mov dword [ebp - 0x5f8], 0
mov dword [ebp - 0x5f4], 0
mov dword [ebp - 0x5ec], fcn.005cff37
mov dword [ebp - 0x5e8], fcn.005cfea2
mov dword [ebp - 0x5e4], fcn.005cff1c
mov dword [ebp - 0x5e0], 0
mov dword [ebp - 0x5dc], 0x1fff8
mov dword [ebp - method.common::allocator_unsigned_char__class_common::TAllocDefault_.virtual_0], vtable.common::t_heap.0
mov dword [ebp - 0x5d8], 0
push 0
push 0
push 0
push 0
push 0
push edi
lea ecx, [ebp - 0x49c]
mov dword [ebp - 4], 0
call fcn.0049a8e0
sub esp, 8
mov byte [ebp - 4], 1
lea eax, [ebp - 0x49c]
lea ecx, [ebp - 0x5fc]
push eax
push ebx
call fcn.004b2810
mov byte [ebp - 4], 0
cmp byte [ebp - 0x380], 0
mov byte [ebp - 0x5c5], al
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x4a4e6f
mov ecx, dword [ebp - 0x494]
lea eax, [ebp - 0x490]
cmp ecx, eax
je 0x4a4e6f
push ecx
call fcn.005cff1c
add esp, 4
push str.ReadConfig
call fcn.004b0260
add esp, 4
cmp byte [ebp - 0x5c5], 0
jne 0x4a4ee6
mov ecx, ebx
call fcn.0049c7f0
push 0x792bc8
push 0x791e68
push eax
call fcn.0049a160
mov eax, dword [ebp - 0x5fc]
add esp, 0xc
test eax, eax
je 0x4a4eb2
push eax
call fcn.005cff1c
add esp, 4
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x5e0]
test eax, eax
je 0x4a4edf
mov edi, dword [ebp - 0x5e4]
nop dword [eax]
mov esi, dword [eax + 4]
push eax
call edi
add esp, 4
mov eax, esi
test esi, esi
jne 0x4a4ed0
xor al, al
jmp 0x4a5232
lea eax, [ebp - 0x5fc]
mov ecx, esi
push eax
call fcn.004a5b10
mov eax, dword [ebp - 0x5fc]
test eax, eax
je 0x4a4f07
push eax
call fcn.005cff1c
add esp, 4
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x5e0]
test eax, eax
je 0x4a5230
mov edi, dword [ebp - 0x5e4]
mov esi, dword [eax + 4]
push eax
call edi
add esp, 4
mov eax, esi
test esi, esi
jne 0x4a4f22
jmp 0x4a5230
push ecx
lea ecx, [ebp - 0x374]
call fcn.004a91b0
mov dword [ebp - method.t_fileRead.virtual_0], vtable.t_fileRead.0
mov dword [ebp - 0x20], 0x794d88
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
push 0
push 0
push 0
push 0
push 0
push edi
lea ecx, [ebp - 0x5c4]
mov dword [ebp - 4], 4
call fcn.0049a8e0
push 0
lea eax, [ebp - 0x5c4]
mov byte [ebp - 4], 5
push eax
push ebx
lea ecx, [ebp - 0x374]
call fcn.004a9310
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
test al, al
jne 0x4a4faa
mov byte [ebp - 0x5c5], 0
jmp 0x4a4fe6
lea eax, [ebp - 0x5d0]
mov dword [ebp - 0x5d0], 0
push eax
push dword [ebp - 0x370]
call edi
mov edi, eax
cmp edi, 0xffffffff
jne 0x4a4fd6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4a4fd6
xor edi, edi
mov dword [ebp - 0x1c], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
mov byte [ebp - 0x5c5], 1
mov byte [ebp - 4], 4
cmp byte [ebp - 0x4a8], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x4a5016
mov eax, dword [ebp - 0x5bc]
lea ecx, [ebp - 0x5b8]
cmp eax, ecx
je 0x4a5016
push eax
call fcn.005cff1c
add esp, 4
cmp byte [ebp - 0x5c5], 0
jne 0x4a5031
mov ecx, ebx
mov esi, 0x792bdc
call fcn.0049c7f0
push esi
jmp 0x4a51e6
lea eax, [ebp - 0x5d0]
mov dword [ebp - 0x5d0], 0
push eax
push dword [ebp - 0x370]
call edi
mov edi, eax
cmp edi, 0xffffffff
jne 0x4a505d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4a505d
xor edi, edi
lea eax, [edi + 1]
push eax
call fcn.005cff37
add esp, 4
mov dword [ebp - 0x5cc], eax
test eax, eax
jne 0x4a5085
mov ecx, ebx
mov esi, 0x792bf0
call fcn.0049c7f0
push esi
jmp 0x4a51e6
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x4a51a0
push 0
lea eax, [ebp - 0x5d0]
mov dword [ebp - 0x5d0], 0
push eax
push edi
push dword [ebp - 0x5cc]
push dword [ebp - 0x370]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4a50fb
cmp byte [ebp - 0x24c], al
lea edi, [ebp - 0x35c]
cmove edi, dword [ebp - 0x360]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, ebx
call fcn.0049c7f0
mov ecx, eax
call fcn.0049c950
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x5cc], 0x794608
jmp 0x4a5122
mov ecx, dword [ebp - 0x5d0]
test ecx, ecx
jne 0x4a5162
cmp byte [ebp - 0x24c], cl
lea edi, [ebp - 0x35c]
mov dword [ebp - 0x5cc], 0x794648
cmove edi, dword [ebp - 0x360]
mov ecx, ebx
call fcn.0049c7f0
push dword [ebp - 0x5cc]
mov esi, eax
push 0x791e68
push esi
call fcn.0049a160
add esp, 0xc
lea ecx, [edi + 4]
push ecx
push 0x791e68
push esi
call fcn.0049a160
add esp, 0xc
mov ecx, ebx
call fcn.0049c7f0
push 0x792c14
jmp 0x4a51e6
cmp ecx, edi
je 0x4a51a0
cmp byte [ebp - 0x24c], 0
lea eax, [ebp - 0x35c]
cmove eax, dword [ebp - 0x360]
add eax, 4
push eax
push ecx
push edi
push str.penc_rN
push ebx
call fcn.0049c8a0
add esp, 0x14
test al, al
jne 0x4a51a3
mov ecx, ebx
call fcn.0049c7f0
push 0x792c14
jmp 0x4a51e6
add dword [ebp - 0x18], edi
mov ebx, dword [ebp - 0x5cc]
lea ecx, [ebp - 0x374]
mov byte [edi + ebx], 0
call fcn.004a9530
push ecx
push edi
push ebx
mov ecx, esi
call fcn.004a5250
push dword [ebp - 0x5cc]
mov bl, al
call fcn.005cff1c
add esp, 4
test bl, bl
jne 0x4a5214
mov ecx, dword [ebp - 0x5d4]
call fcn.0049c7f0
push 0x792bc8
push 0x791e68
push eax
call fcn.0049a160
add esp, 0xc
mov dword [ebp - method.t_fileRead.virtual_0], vtable.t_fileRead.0
lea ecx, [ebp - 0x374]
mov dword [ebp - 0x20], vtable.t_byteStreamRead.0
call fcn.004a9250
xor al, al
jmp 0x4a5232
lea ecx, [ebp - 0x374]
mov dword [ebp - method.t_fileRead.virtual_0], vtable.t_fileRead.0
mov dword [ebp - 0x20], vtable.t_byteStreamRead.0
call fcn.004a9250
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005be209
mov esp, ebp
pop ebp
ret 0xc