Function at 0x49b540
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d9eb0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ebx
call fcn.0049ae50
mov eax, dword [ebx + 0x418]
xor edi, edi
cmp eax, edi
je 0x49b587
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [ebx + 0x418], edi
mov esi, dword [ebp + 8]
lea eax, [ebx + 0x14]
push esi
push 0x4eb504
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
push 0x4ec1ec
push esi
mov dword [ebp - 4], edi
call dword [sym.imp.MSVCRT.dll__wfopen]
add esp, 0x14
cmp eax, edi
mov dword [ebx + 0x418], eax
je 0x49b662
xor ecx, ecx
push eax
push 1
lea edx, [ebp - 0x20]
mov dword [ebp - 0x1f], ecx
push 7
push edx
mov byte [ebp - 0x20], 0
mov word [ebp - 0x1b], cx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov ecx, 7
mov edi, str.TW.2.10
lea esi, [ebp - 0x20]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x49b5f1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x49b5fe
mov eax, dword [ebx + 0x418]
push eax
jmp 0x49b64f
mov ecx, dword [ebx + 0x418]
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push ecx
call edi
mov edx, dword [ebx + 0x418]
push edx
call dword [sym.imp.MSVCRT.dll_ftell]
mov esi, eax
mov eax, dword [ebx + 0x418]
push 0
push 7
push eax
sub esi, 7
call edi
lea edi, [esi + 2]
push edi
mov dword [ebp - 0x14], edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, eax
add esp, 0x20
test edx, edx
mov dword [ebp + 8], edx
jne 0x49b66a
mov ecx, dword [ebx + 0x418]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [ebx + 0x418], 0
or eax, 0xffffffff
jmp 0x49b7af
mov ecx, edi
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx + 0x418]
mov edi, dword [ebp + 8]
push eax
push esi
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, esi
je 0x49b6ae
push edi
call fcn.004d3765
mov dword [ebp + 8], 0
add esp, 4
mov edi, dword [ebp + 8]
jmp 0x49b6c3
cmp dword [ebp - 0x14], 2
jle 0x49b6c3
cmp esi, 2
jle 0x49b6c3
push esi
push edi
call fcn.0049aeb0
add esp, 8
mov ecx, dword [ebx + 0x418]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
or eax, 0xffffffff
test edi, edi
mov dword [ebx + 0x418], 0
mov dword [ebp - 4], eax
je 0x49b7af
mov ecx, dword [ebp - 0x14]
cmp ecx, 2
je 0x49b7af
jl 0x49b701
push edi
mov ecx, ebx
call fcn.0049bd40
dec eax
je 0x49b70c
dec eax
jne 0x49b772
lea eax, [edi + 2]
jmp 0x49b741
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.004d3780
mov edx, dword [ebp + 8]
mov edi, esp
push esi
push edi
push 0xffffffffffffffff
push edx
push 0
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, edi
mov edi, dword [ebp + 8]
test eax, eax
je 0x49b772
mov esi, dword [sym.imp.MSVCRT.dll_wcstok]
push 0x4ebe4c
push eax
call esi
add esp, 8
test eax, eax
je 0x49b772
push eax
mov ecx, ebx
call fcn.0049b0f0
push 0x4ebe4c
push 0
call esi
add esp, 8
test eax, eax
jne 0x49b75a
test edi, edi
je 0x49b77f
push edi
call fcn.004d3765
add esp, 4
mov eax, 1
jmp 0x49b7af
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x2c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4