Function at 0x10019570
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1004f553
push eax
mov eax, dword [ebp + 8]
mov dword fs:[0], esp
sub esp, 0x4c0
push ebx
push esi
push edi
test eax, eax
je 0x1001986c
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x1001986c
mov edi, dword [sym.imp.MSVCR120.dll_int___cdecl__wopen_wchar_t_const___int__int_]
push 0x180
push 0x8000
push eax
call edi
mov ebx, dword [sym.imp.MSVCR120.dll__errno]
add esp, 0xc
mov dword [esp + 0x10], eax
call ebx
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x4d4], 0
cmp dword [esp + 0x10], 0
jge 0x100195ee
mov esi, 2
jmp 0x1001982b
push 0x180
push 0x8301
push esi
call edi
add esp, 0xc
mov esi, eax
mov dword [esp + 0x18], esi
call ebx
mov ecx, dword [eax]
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x4d4], 1
test esi, esi
jns 0x10019622
mov esi, 0xd
jmp 0x10019819
xor eax, eax
push 0x3f0
push eax
mov dword [esp + 0xd1], eax
mov dword [esp + 0xd5], eax
mov dword [esp + 0xd9], eax
mov word [esp + 0xdd], ax
mov byte [esp + 0xdf], al
lea eax, [esp + 0xe0]
push eax
call sub.MSVCR120.dll_memset
mov esi, dword [ebp + 0x10]
lea edi, [esp + 0xd4]
add esp, 0xc
mov ecx, 0x1a
rep movsd dword es:[edi], dword [esi]
push dword [esp + 0x10]
call dword [sym.imp.MSVCR120.dll__filelengthi64]
add esp, 4
mov ebx, eax
lea eax, [esp + 0xc8]
mov esi, edx
mov dword [esp + 0x38], esi
push 0x400
push eax
push dword [esp + 0x20]
call dword [sym.imp.MSVCR120.dll__write]
add esp, 0xc
test eax, eax
jns 0x100196c0
mov esi, dword [sym.imp.MSVCR120.dll__errno]
call esi
cmp dword [eax], 0
je 0x100196b8
call esi
mov esi, dword [eax]
jmp 0x10019819
or esi, 0xffffffff
jmp 0x10019819
push 0x7f
lea eax, [esp + 0x4d]
mov byte [esp + 0x4c], 0
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
lea eax, [esp + 0x48]
push dword [esp + 0xe4]
push dword [esp + 0xe4]
push str._I64d
push 0x7f
push eax
call dword [sym.imp.MSVCR120.dll__snprintf]
add esp, 0x14
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], 0
mov byte [esp + 0x20], 0
push 0xa00000
lea ecx, [esp + 0x24]
mov byte [esp + 0x4d8], 2
call fcn.10003c50
push dword [esp + 0xdc]
xor edi, edi
push dword [esp + 0xdc]
mov dword [esp + 0x14], edi
call sym.KwLib.dll_struct_MusicEncryptPolicy___cdecl_Music_GetEncryptByVer_unsigned_long_long_unsigned___int64__
add esp, 8
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], edx
test esi, esi
jl 0x1001980e
jg 0x1001975a
test ebx, ebx
je 0x1001980e
xor eax, eax
xor edx, edx
mov edi, edi
mov ecx, ebx
sub ecx, eax
mov eax, esi
sbb eax, edx
mov dword [esp + 0x44], eax
js 0x1001977f
jg 0x10019778
cmp ecx, 0xa00000
jbe 0x1001977f
mov esi, 0xa00000
jmp 0x10019783
mov esi, ebx
sub esi, edi
cmp dword [esp + 0x34], 0x10
lea eax, [esp + 0x20]
push esi
cmovae eax, dword [esp + 0x24]
push eax
push dword [esp + 0x18]
call dword [sym.imp.MSVCR120.dll__read]
mov edi, eax
add esp, 0xc
cmp edi, esi
jne 0x10019854
cmp dword [esp + 0x34], 0x10
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x24]
cmovae ecx, dword [esp + 0x24]
push edi
push ecx
call dword [esp + 0x48]
add esp, 0xc
lea eax, [esp + 0x20]
cmp dword [esp + 0x34], 0x10
cmovae eax, dword [esp + 0x20]
push edi
push eax
push dword [esp + 0x20]
call dword [sym.imp.MSVCR120.dll__write]
add esp, 0xc
cmp edi, eax
jne 0x10019854
mov esi, dword [esp + 0xc]
add esi, edi
mov eax, esi
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0xc]
cdq
cmp edx, esi
jl 0x10019760
jg 0x1001980e
cmp eax, ebx
jb 0x10019760
xor esi, esi
lea ecx, [esp + 0x20]
call fcn.10001850
mov eax, dword [esp + 0x18]
test eax, eax
js 0x1001982b
push eax
call dword [sym.imp.MSVCR120.dll__close]
add esp, 4
mov ebx, dword [esp + 0x10]
test ebx, ebx
js 0x1001983d
push ebx
call dword [sym.imp.MSVCR120.dll__close]
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x4cc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.MSVCR120.dll__errno]
call esi
cmp dword [eax], 0
je 0x10019867
call esi
mov esi, dword [eax]
jmp 0x10019810
or esi, 0xffffffff
jmp 0x10019810
mov ecx, dword [esp + 0x4cc]
or eax, 0xffffffff
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret