Function at 0x42ac50
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
push edi
push 0x148
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, dword [ebp + 8]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
mov dword [edi], esi
jne 0x42ac7f
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [ebp + 0x14]
mov dword [esi + 0xc8], ebx
test al, 1
jne 0x42ada5
test al, 4
mov eax, dword [ebp + 0x10]
je 0x42acf0
mov dword [esi + 0xc8], eax
push 0x2c
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea edx, [esp + 0x10]
push ebx
mov edi, eax
mov eax, dword [esi + 0xc8]
push edx
push 0x2c
push edi
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x42ad36
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call edi
mov ecx, dword [esi + 0xc8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp + 8]
mov edx, dword [esi]
push edx
call edi
mov dword [esi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [eax], bl
jne 0x42acfd
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push 0x80
push 3
push ebx
push ebx
push DirectSoundCreate
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0xc8], eax
jne 0x42ac9d
mov ecx, dword [edi]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push esi
mov dword [edi + 4], 0x2c
call fcn.0042ab50
add esp, 8
test eax, eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
jne 0x42ad74
call edi
mov eax, dword [esi + 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp + 8]
mov ecx, dword [esi]
push ecx
call edi
mov dword [esi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edi
mov edx, dword [esi + 0xc8]
push 1
push ebx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esi + 0xcc], eax
jne 0x42adca
mov esi, dword [ebp + 8]
mov eax, dword [esi]
push eax
call edi
mov dword [esi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
push ecx
push esi
call fcn.0042ab50
add esp, 8
test eax, eax
jne 0x42adca
mov edx, dword [edi]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dl, byte [ebp + 0x14]
mov eax, dword [esi + 0xcc]
mov ecx, 2
mov dword [esi + 0xd0], eax
test cl, dl
je 0x42adea
mov dword [esi + 0xd4], eax
jmp 0x42adf0
mov dword [esi + 0xd4], ebx
lea eax, [esi + 0x100]
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], ebx
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax - 0x10], ebx
mov dword [eax - 0xc], ebx
mov dword [eax - 0x20], ebx
mov dword [eax - 0x1c], ebx
add eax, 8
dec ecx
jne 0x42adf6
mov eax, dword [esi + 0xb8]
xor edi, edi
mov di, word [esi + 0xc0]
mov dword [esi + 0x128], eax
mov ecx, edi
xor edx, edx
imul ecx, eax
shl ecx, 3
shr ecx, 3
mov eax, ecx
mov dword [esi + 0x94], 0x64
div edi
mov dword [esi + 0xa8], 1
mov dword [esi + 0x120], ebx
mov dword [esi + 0x124], ebx
mov dword [esi + 0x130], ebx
mov dword [esi + 0x134], ebx
mov dword [esi + 0x138], ebx
mov dword [esi + 0x13c], ebx
mov dword [esi + 0xac], ebx
mov dword [esi + 0x24], ecx
cmp edx, ebx
je 0x42ae85
sub ecx, edx
add ecx, edi
mov dword [esi + 0x24], ecx
cmp dword [esi + 0xb0], ebx
je 0x42aec1
xor ecx, ecx
mov eax, dword [esi + 0x24]
mov cx, word [esi + 0xb6]
xor edx, edx
lea edi, [ecx*8]
sub edi, ecx
shl edi, 3
div edi
mov dword [esi + 0x12c], eax
imul eax, ecx
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 3
mov dword [esi + 0x24], ecx
mov edx, dword [esi + 0x24]
xor eax, eax
shl edx, 3
mov dword [esi + 0x28], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x14
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0x101e0
mov dword [esp + 0x20], eax
lea edx, [esi + 0xb4]
mov dword [esp + 0x24], eax
mov ecx, dword [esi + 0x28]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], edx
cmp dword [esi], ebx
je 0x42af0f
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0xc]
lea edi, [esi + 0x1c]
push ebx
lea edx, [esp + 0x18]
mov ecx, dword [eax]
push edi
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
je 0x42af4b
cmp dword [esi], ebx
je 0x42af34
add esi, 4
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp + 8]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
lea edx, [esi + 0x20]
push edx
push 0x42fd68
mov ecx, dword [eax]
push eax
call dword [ecx]
mov edi, eax
mov eax, dword [esi]
cmp eax, ebx
je 0x42af6d
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, ebx
je 0x42af88
mov esi, dword [ebp + 8]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x18]
pop edi
mov dword [esi + 0x144], edx
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret