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

Disassembly:
push 0xffffffffffffffff
push 0x521c44
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x224
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
cmp esi, ebx
mov dword [esp + 0x28], ebx
je 0x4967ec
mov cl, byte [esp + 0x30]
mov al, byte [esp + 0x30]
lea edi, [esi + 0x20c]
mov byte [edi + 1], cl
lea ecx, [esp + 0x18]
mov byte [edi], al
mov byte [edi + 8], bl
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::constructor_void_]
mov eax, dword [0x588c84]
mov byte [esp + 0x28], 1
cmp eax, ebx
jne 0x49678d
push 1
push ebx
mov ecx, edi
call fcn.004fc600
mov dword [0x588c84], eax
mov dword [eax], ebx
mov edx, dword [0x588c84]
mov dword [edx + 8], ebx
mov ebp, dword [0x588c80]
mov eax, dword [0x588c84]
inc ebp
push ebx
push eax
mov ecx, edi
mov dword [0x588c80], ebp
call fcn.004fc600
mov dword [edi + 4], eax
mov dword [edi + 0xc], ebx
mov dword [eax], eax
mov edi, dword [edi + 4]
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], bl
mov dword [edi + 8], edi
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov ecx, dword [0x53c1a0]
lea edi, [esi + 4]
mov dword [esi + 0x21c], ecx
mov dword [esi], ebx
mov eax, dword [esi + 0x210]
mov ecx, 0x82
mov dword [esi + 0x220], eax
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x4967ee
xor esi, esi
cmp esi, ebx
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x10], esi
jne 0x496816
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
mov edi, dword [sym.imp.MSVCRT.dll_wcslen]
mov dword [edx], esi
mov dword [esi], eax
mov esi, dword [esp + 0x34]
push esi
call edi
add esp, 4
cmp eax, 0x103
jbe 0x496840
mov eax, 0x103
jmp 0x496846
push esi
call edi
add esp, 4
mov ecx, dword [esp + 0x10]
push eax
add ecx, 4
push esi
push ecx
call dword [sym.imp.MSVCRT.dll_wcsncpy]
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov eax, dword [edx]
cmp eax, 2
je 0x496936
cmp eax, 1
jne 0x49687f
push ebx
push esi
call fcn.0043f710
add esp, 8
test eax, eax
je 0x496936
push ebx
push 0x20
push 3
push ebx
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4968a4
mov dword [esp + 0x14], 1
jmp 0x49690a
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, ebx
jbe 0x49692a
lea eax, [edi + 2]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x49690a
lea edx, [esp + 0x38]
push ebx
push edx
lea ecx, [esi + edi]
push edi
push esi
mov dword [esp + 0x48], ebx
push ebp
mov word [ecx], bx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4968f9
cmp edi, dword [esp + 0x38]
jne 0x4968f9
mov eax, dword [esp + 0x30]
push esi
push eax
call fcn.00496180
add esp, 8
mov dword [esp + 0x14], eax
push esi
call fcn.0051e1fa
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, ebx
je 0x49692a
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
cmp eax, ebx
mov dword [ecx], ebx
je 0x49692a
lea edx, [esp + 0x10]
push ebx
push edx
call fcn.00496950
add esp, 8
mov dword [esp + 0x10], ebx
cmp ebp, 0xffffffff
je 0x496936
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret