Function at 0x1002dc90
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003f93b
mov eax, dword fs:[0]
push eax
sub esp, 0x144
mov eax, dword [0x1004f0d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14c], ecx
mov dword [ebp - 0x104], 0x64
mov ecx, dword [ebp + 8]
call dword [sym.imp.KwDataDef.dll_public:_class_CLocalResource____thiscall_CSongInfoBase::GetLocalRes_void_]
mov ecx, eax
call dword [sym.imp.KwDataDef.dll_public:_int___thiscall_CLocalResource::GetFileSize_void_]
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0xd4], 0
mov byte [ebp - 0xee], 1
mov dword [ebp - 0xd8], 0
call fcn.10026490
push eax
lea eax, [ebp - 0xb8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0xa0]
call eax
mov dword [ebp - 0x138], eax
mov ecx, dword [ebp - 0x138]
mov dword [ebp - 0x140], ecx
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x140]
push edx
lea eax, [ebp - 0xd0]
push eax
call fcn.10027b30
add esp, 0xc
mov dword [ebp - 0x148], eax
mov ecx, dword [ebp - 0x148]
mov dword [ebp - 0x12c], ecx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x12c]
call fcn.100256b0
push eax
lea ecx, [ebp - 0x28]
call fcn.10027c00
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xd0]
call fcn.10025630
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xb8]
call fcn.100033c0
cmp dword [ebp - 0x104], 0x64
jne 0x1002de35
cmp dword [ebp - 0xf8], 0
jne 0x1002de35
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea ecx, [ebp - 0x28]
call fcn.100263e0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x100], eax
cmp dword [ebp - 0x100], 0xffffffff
je 0x1002ddff
push 0
mov edx, dword [ebp - 0x100]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xf8], eax
mov eax, dword [ebp - 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1002de35
cmp dword [ebp - 0xd8], 0
je 0x1002de14
mov ecx, dword [ebp - 0xd8]
mov dword [ecx], 1
mov byte [ebp - 0xef], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10014c20
mov al, byte [ebp - 0xef]
jmp 0x1002e4c7
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea ecx, [ebp - 0x28]
call fcn.100263e0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xe0], eax
cmp dword [ebp - 0xe0], 0xffffffff
jne 0x1002de9b
cmp dword [ebp - 0xd8], 0
je 0x1002de7a
mov edx, dword [ebp - 0xd8]
mov dword [edx], 2
mov byte [ebp - 0xed], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10014c20
mov al, byte [ebp - 0xed]
jmp 0x1002e4c7
lea ecx, [ebp - 0x28]
call fcn.100263e0
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.1002f520
add esp, 8
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x28]
call fcn.100263e0
push eax
lea ecx, [ebp - 0x58]
push ecx
call fcn.1002f610
add esp, 8
mov byte [ebp - 4], 6
call fcn.10026490
push eax
lea edx, [ebp - 0x88]
push edx
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0xa8]
call eax
mov dword [ebp - 0x13c], eax
mov ecx, dword [ebp - 0x13c]
mov dword [ebp - 0x134], ecx
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x134]
push edx
lea eax, [ebp - 0xa0]
push eax
call fcn.10027b30
add esp, 0xc
mov dword [ebp - 0x120], eax
mov ecx, dword [ebp - 0x120]
mov dword [ebp - 0x128], ecx
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x128]
call fcn.100256b0
push eax
lea ecx, [ebp - 0x40]
call fcn.10030630
mov byte [ebp - 4], 7
lea ecx, [ebp - 0xa0]
call fcn.10025630
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x88]
call fcn.100033c0
lea edx, [ebp - 0x58]
push edx
lea ecx, [ebp - 0x40]
call fcn.10030610
push 0
push 0x80
push 4
push 0
push 3
push 0x40000000
lea ecx, [ebp - 0x40]
call fcn.100263e0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xe8], eax
cmp dword [ebp - 0xe8], 0xffffffff
jne 0x1002e001
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x150], eax
mov eax, dword [ebp - 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xd8], 0
je 0x1002dfc8
mov ecx, dword [ebp - 0xd8]
mov dword [ecx], 3
mov byte [ebp - 0xea], 0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x58]
call fcn.10014c20
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.10014c20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10014c20
mov al, byte [ebp - 0xea]
jmp 0x1002e4c7
mov edx, dword [ebp - 0xf8]
shr edx, 0xe
mov dword [ebp - 0xfc], edx
mov eax, dword [ebp - 0xf8]
xor edx, edx
mov ecx, 0x4000
div ecx
test edx, edx
je 0x1002e032
mov edx, dword [ebp - 0xfc]
add edx, 1
mov dword [ebp - 0xfc], edx
mov eax, dword [ebp - 0xfc]
mov dword [ebp - 0x118], eax
cvtsi2sd xmm0, dword [ebp - 0x118]
mov ecx, dword [ebp - 0x118]
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x100436c0]
mov edx, dword [ebp - 0x104]
mov dword [ebp - 0x10c], edx
cvtsi2sd xmm1, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x10c]
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x100436c0]
addsd xmm1, qword [0x100436a8]
mulsd xmm0, xmm1
divsd xmm0, qword [0x10043fd8]
call fcn.1003b641
mov dword [ebp - 0xdc], eax
mov ecx, dword [ebp - 0xdc]
mov dword [ebp - 0x110], ecx
cvtsi2sd xmm0, dword [ebp - 0x110]
mov edx, dword [ebp - 0x110]
shr edx, 0x1f
addsd xmm0, qword [edx*8 + 0x100436c0]
mov eax, dword [ebp - 0xfc]
mov dword [ebp - 0x108], eax
cvtsi2sd xmm1, dword [ebp - 0x108]
mov ecx, dword [ebp - 0x108]
shr ecx, 0x1f
addsd xmm1, qword [ecx*8 + 0x100436c0]
mov edx, dword [ebp - 0x104]
mov dword [ebp - 0x114], edx
cvtsi2sd xmm2, dword [ebp - 0x114]
mov eax, dword [ebp - 0x114]
shr eax, 0x1f
addsd xmm2, qword [eax*8 + 0x100436c0]
addsd xmm2, qword [0x100436a8]
mulsd xmm1, xmm2
divsd xmm1, qword [0x10043fd8]
comisd xmm1, xmm0
jbe 0x1002e138
mov ecx, dword [ebp - 0xdc]
add ecx, 1
mov dword [ebp - 0xdc], ecx
mov edx, dword [ebp - 0xdc]
shl edx, 0xe
cmp dword [ebp - 0xd4], edx
jae 0x1002e42d
mov eax, dword [ebp - 0xd4]
cmp eax, dword [ebp - 0xf8]
jae 0x1002e42d
push 0
push 0
mov ecx, dword [ebp - 0xd4]
push ecx
mov edx, dword [ebp - 0xe0]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1002e1e4
mov eax, dword [ebp - 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xe8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xd8], 0
je 0x1002e1ab
mov edx, dword [ebp - 0xd8]
mov dword [edx], 4
mov byte [ebp - 0xec], 0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x58]
call fcn.10014c20
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.10014c20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10014c20
mov al, byte [ebp - 0xec]
jmp 0x1002e4c7
mov eax, dword [ebp - 0xdc]
shl eax, 0xe
sub eax, dword [ebp - 0xd4]
push eax
call fcn.1003ab3c
add esp, 4
mov dword [ebp - 0x130], eax
mov ecx, dword [ebp - 0x130]
mov dword [ebp - 0xf4], ecx
mov edx, dword [ebp - 0xdc]
shl edx, 0xe
sub edx, dword [ebp - 0xd4]
push edx
push 0
mov eax, dword [ebp - 0xf4]
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
mov dword [ebp - 0xe4], 0
push 0
lea ecx, [ebp - 0xe4]
push ecx
mov edx, dword [ebp - 0xdc]
shl edx, 0xe
sub edx, dword [ebp - 0xd4]
push edx
mov eax, dword [ebp - 0xf4]
push eax
mov ecx, dword [ebp - 0xe0]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002e412
cmp dword [ebp - 0xe4], 0
jbe 0x1002e39f
push 0
push 0
mov edx, dword [ebp - 0xd4]
push edx
mov eax, dword [ebp - 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
movzx ecx, byte [ebp - 0xee]
test ecx, ecx
je 0x1002e2f6
cmp dword [ebp - 0xd4], 0x4000
jae 0x1002e2f6
mov edx, 0x4000
sub edx, dword [ebp - 0xd4]
cmp dword [ebp - 0xe4], edx
jb 0x1002e2dd
push 0
mov eax, 0x4000
sub eax, dword [ebp - 0xd4]
push eax
mov ecx, dword [ebp - 0xf4]
push ecx
call dword [sym.imp.KwLib.dll_void___cdecl_KwLib::Entrypt::Decrypt_char___int__int_]
add esp, 0xc
jmp 0x1002e2f6
push 0
mov edx, dword [ebp - 0xe4]
push edx
mov eax, dword [ebp - 0xf4]
push eax
call dword [sym.imp.KwLib.dll_void___cdecl_KwLib::Entrypt::Decrypt_char___int__int_]
add esp, 0xc
push 0
lea ecx, [ebp - 0xe4]
push ecx
mov edx, dword [ebp - 0xe4]
push edx
mov eax, dword [ebp - 0xf4]
push eax
mov ecx, dword [ebp - 0xe8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0xe4], 0
ja 0x1002e38b
mov edx, dword [ebp - 0xe0]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xd8], 0
je 0x1002e352
mov ecx, dword [ebp - 0xd8]
mov dword [ecx], 5
mov byte [ebp - 0xf0], 0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x58]
call fcn.10014c20
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.10014c20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10014c20
mov al, byte [ebp - 0xf0]
jmp 0x1002e4c7
mov edx, dword [ebp - 0xd4]
add edx, dword [ebp - 0xe4]
mov dword [ebp - 0xd4], edx
jmp 0x1002e412
cmp dword [ebp - 0xd8], 0
je 0x1002e3bf
mov eax, dword [ebp - 0xdc]
shl eax, 0xe
sub eax, dword [ebp - 0xd4]
mov ecx, dword [ebp - 0xd8]
mov dword [ecx], eax
mov edx, dword [ebp - 0xe0]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0xeb], 0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x58]
call fcn.10014c20
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.10014c20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10014c20
mov al, byte [ebp - 0xeb]
jmp 0x1002e4c7
mov ecx, dword [ebp - 0xf4]
mov dword [ebp - 0x124], ecx
mov edx, dword [ebp - 0x124]
push edx
call sub.MSVCR120.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [ebp - 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xe8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.10026490
push eax
lea edx, [ebp - 0x40]
push edx
lea eax, [ebp - 0x70]
push eax
call fcn.10028820
add esp, 0xc
mov dword [ebp - 0x144], eax
mov ecx, dword [ebp - 0x144]
mov dword [ebp - 0x11c], ecx
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x11c]
call fcn.100289d0
push eax
mov ecx, dword [ebp + 0xc]
call fcn.10027c40
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x70]
call fcn.10028990
mov byte [ebp - 0xe9], 1
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x58]
call fcn.10014c20
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.10014c20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10014c20
mov al, byte [ebp - 0xe9]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1003b334
mov esp, ebp
pop ebp
ret 8