Function at 0x5d30c0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x8773ae
mov eax, dword fs:[0]
push eax
sub esp, 0xb4
mov eax, dword [0x8ce6f4]
xor eax, esp
mov dword [esp + 0xb0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0xc8]
mov dword fs:[0], eax
mov eax, dword [esp + 0xe0]
mov ebp, dword [esp + 0xdc]
mov esi, ecx
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0xd8]
push ecx
xor ebx, ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0xd4], ebx
call fcn.004a8f10
lea ecx, [esp + 0x18]
mov byte [esp + 0xd0], 1
mov dword [ebp], ebx
mov dword [ebp + 4], ebx
call fcn.004f5ad0
lea ecx, [esp + 0x18]
call fcn.004f5ad0
mov edx, dword [esp + 0xd8]
push ebx
push 0x8000001
push 3
push ebx
push 3
push DirectSoundEnumerateW
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
je 0x5d35ed
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [esp + 0x24]
push ecx
push 4
lea edx, [esp + 0x6c]
push edx
push eax
mov byte [esp + 0x2b], bl
call edi
cmp dword [esp + 0x60], 0x534c504d
jne 0x5d3584
mov edx, dword [esi + 8]
push ebx
lea eax, [esp + 0x24]
push eax
push 4
lea ecx, [esp + 0x6c]
push ecx
push edx
call edi
mov eax, dword [esp + 0x60]
cmp eax, 0x30303230
je 0x5d31c4
cmp eax, 0x30303130
jne 0x5d3518
mov ecx, esi
call fcn.005d2e60
mov ecx, esi
mov ebx, eax
mov dword [esp + 0x28], 0
call fcn.005d2e60
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 8]
push 0
push 0
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, esi
call fcn.005d2e60
mov ecx, esi
call fcn.005d2f00
mov ecx, esi
call fcn.005d2f00
movzx edx, ax
mov ecx, esi
mov dword [esp + 0x20], edx
call fcn.005d2f00
movzx eax, word [esp + 0x20]
add ebx, 0xa
mov ecx, 0
adc dword [esp + 0x28], ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x20], eax
cmp eax, ecx
ja 0x5d32a4
mov eax, dword [esi + 8]
or edi, 0xffffffff
cmp eax, edi
je 0x5d3248
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], edi
mov eax, dword [esp + 0x18]
xor ecx, ecx
cmp byte [esp + 0x17], cl
mov byte [esp + 0xd0], 0
setne cl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov esi, ecx
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x5d327a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xd8]
add eax, 0xfffffff0
mov dword [esp + 0xd0], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jmp 0x5d3645
mov ebx, dword [esp + 0x24]
call fcn.007cff5d
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x5d3477
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x28]
mov edx, dword [esi + 8]
push 0
push 0
push ecx
push ebx
push edx
mov byte [esp + 0xe4], 2
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edx, dword [esi + 8]
push 0
lea eax, [esp + 0x50]
push eax
push 1
lea ecx, [esp + 0x2b]
push ecx
push edx
call edi
mov edx, dword [esi + 8]
mov bl, byte [esp + 0x1f]
push 0
lea eax, [esp + 0x54]
push eax
push 1
lea ecx, [esp + 0x2a]
push ecx
push edx
call edi
movzx ecx, byte [esp + 0x1e]
movzx eax, bl
shl ax, 8
cwde
or eax, ecx
mov ecx, dword [esi + 8]
add eax, 2
cdq
add dword [esp + 0x24], eax
push 0
lea eax, [esp + 0x64]
adc dword [esp + 0x2c], edx
lea edx, [esp + 0x5c]
push edx
push 5
push eax
push ecx
call edi
movzx edx, byte [esp + 0x64]
movzx eax, byte [esp + 0x63]
movzx ecx, byte [esp + 0x62]
push edx
push eax
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x24]
movzx edx, ah
push edx
movzx eax, al
push eax
push ecx
lea edx, [esp + 0x4c]
push 0x430b80
push edx
call fcn.004aa600
mov edx, dword [esi + 8]
add esp, 0x20
push 0
lea eax, [esp + 0x58]
push eax
push 4
lea ecx, [esp + 0x6c]
push ecx
push edx
call edi
cmp dword [esp + 0x60], 0x5354324d
jne 0x5d3481
mov edx, dword [esi + 8]
push 0
lea eax, [esp + 0x60]
push eax
push 3
lea ecx, [esp + 0x6c]
push ecx
push edx
call edi
mov ecx, esi
call fcn.005d2e60
mov ecx, 0x4e20
mul ecx
push 0
push 0x5a
push edx
push eax
call fcn.00803a40
mov ebx, eax
mov ecx, esi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], edx
call fcn.005d2e60
mov edx, 0x4e20
mul edx
push 0
push 0x5a
push edx
push eax
call fcn.00803a40
mov dword [esp + 0x44], eax
sub eax, ebx
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x48], edx
sbb edx, dword [esp + 0x40]
add dword [ebp], eax
push 0
lea eax, [esp + 0x38]
adc dword [ebp + 4], edx
push eax
mov ecx, ebx
call fcn.005d2fa0
test eax, eax
je 0x5d3415
mov byte [esp + 0x17], 1
mov ecx, dword [ebx + 4]
push 0
push ecx
lea edx, [esp + 0x3c]
push edx
mov ecx, ebx
call fcn.005d3010
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x5d3432
mov dword [ecx], eax
jmp 0x5d3434
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0xd0], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5d345f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x20]
jb 0x5d32a0
jmp 0x5d3234
push 0x80004005
call fcn.004a8210
mov eax, dword [esi + 8]
or edi, 0xffffffff
cmp eax, edi
je 0x5d3495
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], edi
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0xd0], 1
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5d34bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0xd0], 0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5d34e3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xd8]
add eax, 0xfffffff0
mov dword [esp + 0xd0], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x5d35e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x8004022f
jmp 0x5d3653
mov eax, dword [esi + 8]
or edi, 0xffffffff
cmp eax, edi
je 0x5d352c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], edi
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0xd0], 0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5d3553
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xd8]
add eax, 0xfffffff0
mov dword [esp + 0xd0], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x5d35e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x8004022f
jmp 0x5d3653
mov eax, dword [esi + 8]
or edi, 0xffffffff
cmp eax, edi
je 0x5d3598
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], edi
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0xd0], 0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5d35bf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xd8]
add eax, 0xfffffff0
mov dword [esp + 0xd0], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x5d35e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x8004022f
jmp 0x5d3653
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or esi, 0x80070000
mov byte [esp + 0xd0], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5d3623
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xd8]
add eax, 0xfffffff0
mov dword [esp + 0xd0], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5d3651
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0xc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.0080262b
add esp, 0xc0
ret 0xc