Function at 0x448510
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov dword [esp + 0x14], ecx
cmp dword [ebp], 0
jne 0x448af5
mov eax, dword [esp + 0x34]
push 0
push 0x80
push 3
mov edi, 1
push 0
push edi
push DirectSoundCreate
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x448af5
mov ebx, dword [sym.imp.kernel32.dll_ReadFile]
lea ecx, [esp + 0x34]
push 0
push ecx
lea edx, [esp + 0x20]
push edi
push edx
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea eax, [esp + 0x34]
push 0
push eax
lea ecx, [esp + 0x21]
push edi
push ecx
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea edx, [esp + 0x34]
push 0
push edx
lea eax, [esp + 0x22]
push edi
push eax
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea ecx, [esp + 0x34]
push 0
mov edi, 2
push ecx
lea edx, [esp + 0x24]
push edi
push edx
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea eax, [esp + 0x34]
push 0
push eax
lea ecx, [esp + 0x26]
push edi
push ecx
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea edx, [esp + 0x34]
push 0
push edx
lea eax, [esp + 0x28]
push 1
push eax
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], 1
jne 0x448aee
lea ecx, [esp + 0x34]
push 0
push ecx
lea edx, [esp + 0x2a]
push edi
push edx
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea eax, [esp + 0x34]
push 0
push eax
lea ecx, [esp + 0x2c]
push edi
push ecx
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea edx, [esp + 0x34]
push 0
push edx
lea eax, [esp + 0x2e]
push edi
push eax
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea ecx, [esp + 0x34]
push 0
push ecx
lea edx, [esp + 0x30]
push edi
push edx
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea eax, [esp + 0x34]
push 0
mov edi, 1
push eax
lea ecx, [esp + 0x32]
push edi
push ecx
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
lea edx, [esp + 0x34]
push 0
push edx
lea eax, [esp + 0x33]
push edi
push eax
push esi
call ebx
test eax, eax
je 0x448aee
cmp dword [esp + 0x34], edi
jne 0x448aee
cmp byte [esp + 0x1a], 2
jne 0x448aee
mov dl, byte [esp + 0x2a]
cmp dl, 0x18
je 0x44871c
cmp dl, 0x20
jne 0x448aee
mov edi, dword [esp + 0x26]
mov ecx, 0x400
mov dword [esp + 0x10], ecx
mov ax, cx
cmp di, ax
je 0x448749
shr ax, 1
jne 0x44872c
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret 0x18
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], ecx
cmp ax, cx
je 0x44876e
shr cx, 1
jne 0x448751
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret 0x18
cmp dl, 0x18
jne 0x44878a
and eax, 0xffff
and edi, 0xffff
imul eax, edi
lea ecx, [eax + eax*2]
mov dword [esp + 0x10], ecx
jmp 0x44879f
and eax, 0xffff
and edi, 0xffff
imul eax, edi
shl eax, 2
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x10]
push edx
push 0
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x448aee
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x34]
push 0
push eax
push ecx
push edi
push esi
call ebx
test eax, eax
je 0x448ae7
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x34]
cmp eax, ebx
jne 0x448ae7
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
jne 0x4487fc
push edi
call dword [sym.imp.kernel32.dll_GlobalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret 0x18
push ebx
push 0
call dword [sym.imp.kernel32.dll_GlobalAlloc]
test eax, eax
mov dword [ebp + 0xc], eax
jne 0x44881f
push edi
call dword [sym.imp.kernel32.dll_GlobalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret 0x18
cmp byte [esp + 0x2a], 0x18
jne 0x44890b
mov eax, dword [esp + 0x28]
xor esi, esi
test ax, ax
jbe 0x4489ff
mov ebx, dword [esp + 0x26]
mov edx, ebx
xor ecx, ecx
and edx, 0xffff
jle 0x4488f5
and eax, 0xffff
mov ebp, dword [ebp + 0xc]
sub eax, esi
dec eax
imul eax, edx
imul edx, esi
add eax, ecx
add edx, ecx
lea ebx, [edi + eax*2]
lea edx, [edx + edx*2]
mov al, byte [eax + ebx + 2]
mov byte [edx + ebp], al
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x26]
and eax, 0xffff
sub eax, esi
and edx, 0xffff
dec eax
mov ebp, dword [esp + 0x30]
imul eax, edx
imul edx, esi
mov ebp, dword [ebp + 0xc]
add eax, ecx
add edx, ecx
lea ebx, [edi + eax*2]
lea edx, [edx + edx*2]
mov al, byte [eax + ebx + 1]
mov byte [edx + ebp + 1], al
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x26]
and eax, 0xffff
sub eax, esi
and edx, 0xffff
dec eax
mov ebp, dword [esp + 0x30]
imul eax, edx
imul edx, esi
mov ebp, dword [ebp + 0xc]
add eax, ecx
add edx, ecx
inc ecx
lea ebx, [edi + eax*2]
lea edx, [edx + edx*2]
mov al, byte [eax + ebx]
mov byte [edx + ebp + 2], al
mov ebx, dword [esp + 0x26]
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x30]
mov edx, ebx
and edx, 0xffff
cmp ecx, edx
jl 0x44884d
mov ecx, eax
inc esi
and ecx, 0xffff
cmp esi, ecx
jl 0x44883d
jmp 0x4489ff
mov esi, dword [esp + 0x28]
xor ecx, ecx
test si, si
jbe 0x4489ff
mov ebx, dword [esp + 0x26]
mov edx, ebx
xor eax, eax
and edx, 0xffff
jle 0x4489ef
and esi, 0xffff
mov ebx, dword [ebp + 0xc]
sub esi, ecx
mov dword [esp + 0x30], ebx
dec esi
imul esi, edx
imul edx, ecx
add esi, eax
add edx, eax
mov bl, byte [edi + esi*4 + 2]
mov esi, dword [esp + 0x30]
mov byte [esi + edx*4], bl
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x26]
and edx, 0xffff
sub edx, ecx
and esi, 0xffff
dec edx
mov ebx, dword [ebp + 0xc]
imul edx, esi
imul esi, ecx
add edx, eax
add esi, eax
mov dl, byte [edi + edx*4 + 1]
mov byte [ebx + esi*4 + 1], dl
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x26]
and edx, 0xffff
sub edx, ecx
and esi, 0xffff
dec edx
mov ebx, dword [ebp + 0xc]
imul edx, esi
imul esi, ecx
add edx, eax
add esi, eax
mov dl, byte [edi + edx*4]
mov byte [ebx + esi*4 + 2], dl
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x26]
and edx, 0xffff
sub edx, ecx
and esi, 0xffff
dec edx
mov ebx, dword [ebp + 0xc]
imul edx, esi
imul esi, ecx
add edx, eax
add esi, eax
inc eax
mov dl, byte [edi + edx*4 + 3]
mov byte [ebx + esi*4 + 3], dl
mov ebx, dword [esp + 0x26]
mov esi, dword [esp + 0x28]
mov edx, ebx
and edx, 0xffff
cmp eax, edx
jl 0x44892e
mov eax, esi
inc ecx
and eax, 0xffff
cmp ecx, eax
jl 0x44891e
push edi
call dword [sym.imp.kernel32.dll_GlobalFree]
mov cl, byte [esp + 0x2a]
mov esi, dword [esp + 0x26]
mov eax, dword [esp + 0x28]
cmp cl, 0x18
mov dword [ebp], 1
mov word [ebp + 4], si
mov word [ebp + 6], ax
jne 0x448a30
mov byte [ebp + 8], 3
mov byte [ebp + 9], 0
jmp 0x448a90
xor ebx, ebx
and eax, 0xffff
mov byte [ebp + 8], 4
mov dword [esp + 0x30], eax
jle 0x448a80
and esi, 0xffff
xor edi, edi
xor edx, edx
test esi, esi
jle 0x448a6e
mov ecx, dword [ebp + 0xc]
lea ecx, [edi + ecx + 3]
mov al, byte [ecx]
test al, al
jbe 0x448a60
cmp al, 0xff
jb 0x448a6a
inc edx
add ecx, 4
cmp edx, esi
jl 0x448a56
jmp 0x448a6e
cmp edx, esi
jl 0x448a80
lea eax, [esi*4]
inc ebx
add edi, eax
mov eax, dword [esp + 0x30]
cmp ebx, eax
jl 0x448a49
cmp ebx, dword [esp + 0x30]
jne 0x448a8c
mov byte [ebp + 9], 0
jmp 0x448a90
mov byte [ebp + 9], 1
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x14]
test esi, esi
jle 0x448aa7
push ebp
mov ecx, edi
call fcn.00449180
dec esi
jne 0x448a9c
mov ecx, dword [esp + 0x3c]
xor eax, eax
cmp ecx, eax
mov dword [ebp + 0x10], eax
je 0x448ad5
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
push edx
push eax
push ebp
mov ecx, edi
call fcn.00448b10
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1c
ret 0x18
pop edi
mov dword [ebp + 0x14], eax
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1c
ret 0x18
push edi
call dword [sym.imp.kernel32.dll_GlobalFree]
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret 0x18