Function at 0x49c970
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4db450
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.0049c280
mov eax, dword [ebx + 0x418]
xor edi, edi
cmp eax, edi
je 0x49c9b7
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 0x4ed128
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
push 0x4ede94
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 0x49ca92
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 0x49ca21
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x49ca2e
mov eax, dword [ebx + 0x418]
push eax
jmp 0x49ca7f
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 0x49ca9a
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 0x49cbdf
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 0x49cade
push edi
call fcn.004d4cc1
mov dword [ebp + 8], 0
add esp, 4
mov edi, dword [ebp + 8]
jmp 0x49caf3
cmp dword [ebp - 0x14], 2
jle 0x49caf3
cmp esi, 2
jle 0x49caf3
push esi
push edi
call fcn.0049c2e0
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 0x49cbdf
mov ecx, dword [ebp - 0x14]
cmp ecx, 2
je 0x49cbdf
jl 0x49cb31
push edi
mov ecx, ebx
call fcn.0049d170
dec eax
je 0x49cb3c
dec eax
jne 0x49cba2
lea eax, [edi + 2]
jmp 0x49cb71
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.004d4ce0
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 0x49cba2
mov esi, dword [sym.imp.MSVCRT.dll_wcstok]
push 0x4edacc
push eax
call esi
add esp, 8
test eax, eax
je 0x49cba2
push eax
mov ecx, ebx
call fcn.0049c520
push 0x4edacc
push 0
call esi
add esp, 8
test eax, eax
jne 0x49cb8a
test edi, edi
je 0x49cbaf
push edi
call fcn.004d4cc1
add esp, 4
mov eax, 1
jmp 0x49cbdf
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