Function at 0x49d860
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x5153d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ecx
push 0x50f46c
push 0x7d1178
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 0
push DirectSoundEnumerateA
push 0x7d1178
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x49e06d
mov ecx, dword [0x7ccd70]
add ecx, 4
mov dword [0x7ccd70], ecx
cmp ecx, 0x4000
jbe 0x49d8d5
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 8]
push 0
push eax
push 4
push 0x6e6bbc
push esi
call ebx
cmp dword [0x6e6bbc], 3
jne 0x49e06d
mov eax, dword [0x7ccd70]
add eax, 0x100
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49d91d
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 0x100
push 0x6e6c90
push esi
call ebx
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49d953
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 0xc]
push eax
push esi
call ebx
mov eax, 0x80
cmp word [ebp - 0xc], ax
jne 0x49e06d
mov eax, dword [0x7ccd70]
sub eax, 0xffffff80
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49d994
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 0x80
push 0x6e6ae8
push esi
call ebx
movsx eax, word [0x6e6b28]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c3c], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6bf8
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b2a]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c4c], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b2a]
push 0x6e6c0c
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b2c]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c44], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b2c]
push 0x6e6c04
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b2e]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c48], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b2e]
push 0x6e6c08
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6b6c], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6c00
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b30]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c40], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b30]
push 0x6e6bfc
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
lea ecx, [eax*2 + 2]
mov eax, dword [0x7ccd70]
add eax, ecx
mov dword [ebp - 0x10], ecx
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49db5d
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov ecx, dword [ebp - 0x10]
push 0
lea eax, [ebp - 8]
push eax
push ecx
push 0x6e6db0
push esi
call ebx
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49db8f
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 0xc]
push eax
push esi
call ebx
movsx eax, word [ebp - 0xc]
push eax
push 0
call edi
mov dword [ebp - 0x10], eax
mov dword [0x6e6bc4], eax
test eax, eax
je 0x49e06d
movsx edx, word [ebp - 0xc]
mov ecx, dword [0x7ccd70]
add ecx, edx
mov dword [ebp - 0x14], edx
mov dword [0x7ccd70], ecx
cmp ecx, 0x4000
jbe 0x49dbe9
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
push 0
lea ecx, [ebp - 8]
push ecx
push edx
push eax
push esi
call ebx
movsx edx, word [0x6e6b28]
xor ecx, ecx
mov eax, dword [0x6e6bc4]
mov dword [0x6e6bc0], eax
test edx, edx
jle 0x49dcf8
cmp edx, 8
jb 0x49dcc3
mov eax, edx
and eax, 0x80000007
jns 0x49dc26
dec eax
or eax, 0xfffffff8
inc eax
movd xmm0, dword [0x6e6bc4]
movaps xmm3, xmmword [0x510850]
mov dword [ebp - 0x10], edx
sub dword [ebp - 0x10], eax
mov eax, 1
pshufd xmm2, xmm0, 0
movd xmm4, eax
mov eax, dword [ebp - 0x10]
nop dword [eax]
movq xmm0, qword [ecx*2 + 0x6e6db2]
xorps xmm1, xmm1
punpcklwd xmm0, xmm0
psrad xmm0, 0x10
pcmpgtd xmm1, xmm0
andps xmm1, xmm3
paddd xmm1, xmm0
movq xmm0, qword [ecx*2 + 0x6e6dba]
psrad xmm1, xmm4
punpcklwd xmm0, xmm0
paddd xmm1, xmm1
psrad xmm0, 0x10
paddd xmm1, xmm2
movups xmmword [ecx*4 + 0x6e6f40], xmm1
xorps xmm1, xmm1
pcmpgtd xmm1, xmm0
andps xmm1, xmm3
paddd xmm1, xmm0
psrad xmm1, xmm4
paddd xmm1, xmm1
paddd xmm1, xmm2
movups xmmword [ecx*4 + 0x6e6f50], xmm1
add ecx, 8
cmp ecx, eax
jl 0x49dc50
cmp ecx, edx
jge 0x49dcf8
mov edi, dword [0x6e6bc4]
nop dword [eax]
movsx eax, word [ecx*2 + 0x6e6db2]
mov eax, eax
test eax, eax
jns 0x49dce1
add eax, 1
sar eax, 1
lea eax, [edi + eax*2]
mov dword [ecx*4 + 0x6e6f40], eax
inc ecx
cmp ecx, edx
jl 0x49dcd0
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ax, word [0x6e6b32]
test ax, ax
je 0x49dd3f
movsx ecx, ax
mov eax, dword [0x7ccd70]
add ecx, ecx
add eax, ecx
mov dword [ebp - 0x14], ecx
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49dd30
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov ecx, dword [ebp - 0x14]
push 0
lea eax, [ebp - 8]
push eax
push ecx
push 0x6e6b70
push esi
call ebx
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49dd62
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 0xc]
push eax
push esi
call ebx
cmp word [ebp - 0xc], 0x5c
jne 0x49e06d
push 0x170
push 0
call edi
mov dword [0x6e6c38], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
push 0x6e6bf4
mov ecx, 0x5c
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
push 0xa4
push 0
call edi
mov dword [0x6e6b68], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
push 0x6e6bf0
mov ecx, 0x29
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c2c], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6be4
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c28], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6be0
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c24], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6bdc
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c20], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6bd8
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c34], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6bec
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c30], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6be8
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c1c], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6bd4
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c18], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6bd0
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c14], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6bcc
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
movsx eax, word [0x6e6b28]
shl eax, 2
push eax
push 0
call edi
mov dword [0x6e6c10], eax
test eax, eax
je 0x49e06d
push esi
lea ecx, [ebp - 8]
mov edx, eax
push ecx
movsx ecx, word [0x6e6b28]
push 0x6e6bc8
call fcn.0049d630
add esp, 0xc
test eax, eax
je 0x49e06d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b557b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b557b
mov esp, ebp
pop ebp
ret