Function at 0x535980
Capabilities:
Get disk size
Get file size

Disassembly:
sub esp, 0x134
push ebx
push ebp
push esi
mov esi, 1
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 0x80
call fcn.00535860
mov ebp, eax
mov eax, dword [esp + 0x150]
push 0
mov dword [esp + 0x30], ebp
mov dword [eax], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [esp + 0x14c]
mov eax, ebx
and eax, esi
mov dword [esp + 0x1c], DirectSoundCreate
mov dword [esp + 0x30], eax
je 0x5359e2
mov dword [esp + 0x18], esi
jmp 0x5359ea
mov dword [esp + 0x1c], 0xc0000000
test bl, 2
je 0x535a01
test bl, 4
mov ecx, 0
setne cl
inc ecx
mov dword [esp + 0x14], ecx
jmp 0x535a14
mov edx, ebx
and dl, 4
neg dl
sbb edx, edx
and edx, 2
add edx, 3
mov dword [esp + 0x14], edx
test bl, 0x10
je 0x535a21
mov dword [esp + 0x10], 0x20000080
test bl, 0x20
je 0x535a2e
or dword [esp + 0x10], 0x8000000
mov eax, dword [0x6694d0]
mov edi, dword [esp + 0x148]
shl ebp, 5
push edi
mov dword [eax + ebp + 8], ebx
call fcn.00536c80
add esp, 4
test eax, eax
je 0x535a53
add eax, 0xffffffc0
jmp 0x535a55
xor eax, eax
mov ecx, dword [0x6694d0]
test bl, 0x40
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov byte [ecx + ebp + 1], al
jne 0x535b0e
push edi
call fcn.00535910
add esp, 4
test al, al
je 0x535b08
mov ecx, dword [0x5c1f5c]
mov dl, byte [ecx]
mov eax, dword [0x6694d0]
sub dl, 0x40
mov byte [eax + ebp + 1], dl
mov eax, dword [0x5c1f5c]
lea edx, [esp + 0x40]
sub edx, eax
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x535aa0
mov eax, edi
mov esi, edi
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x535ab0
lea edi, [esp + 0x40]
sub eax, esi
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x535ac0
mov edx, dword [esp + 0x14]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x24]
push edx
push 0
push eax
push ecx
lea edx, [esp + 0x58]
push edx
call ebx
mov ecx, dword [0x6694d0]
mov edi, dword [esp + 0x148]
mov dword [ecx + ebp + 4], eax
jmp 0x535b0e
mov ecx, dword [0x6694d0]
mov eax, dword [ecx + ebp + 4]
cmp eax, 0xffffffff
lea esi, [ecx + ebp]
jne 0x535b3b
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push 0
push eax
mov eax, dword [esp + 0x24]
lea esi, [ecx + ebp]
mov ecx, dword [esp + 0x1c]
push ecx
push 0
push edx
push eax
push edi
call ebx
mov dword [esi + 4], eax
mov dword [esp + 0x28], 0x5c3a20
mov cl, byte [esi + 1]
add cl, 0x40
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x38]
push eax
mov byte [esp + 0x30], cl
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x535b7b
mov edx, 0x800
mov dword [esp + 0x24], edx
jmp 0x535b7f
mov edx, dword [esp + 0x24]
mov ecx, dword [0x6694d0]
mov esi, dword [ecx + ebp + 4]
cmp esi, 0xffffffff
lea eax, [ecx + ebp + 4]
je 0x535c5f
test edx, edx
jne 0x535ba4
mov dword [ecx + ebp + 0xc], 0x4000
jmp 0x535ba8
mov dword [ecx + ebp + 0xc], edx
lea esi, [ecx + ebp]
mov ecx, dword [eax]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x1c], eax
test byte [esp + 0x14c], 8
je 0x535c2f
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x535bd7
mov eax, 0x8000004
mov edi, 2
jmp 0x535be1
mov eax, 0x8000002
mov edi, 4
mov edx, dword [esi + 4]
push 0
push 0
push 0
push eax
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov ecx, dword [0x6694d0]
lea esi, [ecx + ebp]
mov dword [esi + 0x10], eax
je 0x535c1a
lea esi, [ecx + ebp]
mov ecx, dword [esi + 0x1c]
push ecx
push 0
push 0
push edi
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x535c41
and dword [esi + 8], 0xfffffff7
mov dword [esp + 0x20], 0
jmp 0x535c41
and dword [esi + 8], 0xfffffff7
mov dword [esi + 0x10], 0xffffffff
mov dword [esi + 0x14], 0
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x150]
pop edi
pop esi
not eax
pop ebp
mov dword [edx], eax
mov eax, dword [esp + 0x14]
pop ebx
add esp, 0x134
ret
pop edi
xor eax, eax
pop esi
mov byte [ecx + ebp], al
pop ebp
pop ebx
add esp, 0x134
ret