Function at 0x10016260
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004d7f0
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x10073498]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x54], ecx
mov eax, dword [ebp + 8]
mov edi, 0
mov dword [ebp - 0x50], eax
mov ecx, dword [eax + 0x3c]
add ecx, eax
mov dword [ebp - 0x4c], ecx
mov esi, dword [ecx + 0x80]
add esi, eax
mov eax, 0xcccccccd
mul dword [ecx + 0x84]
mov dword [ebp - 0x5c], esi
mov eax, edx
shr eax, 4
sub eax, 1
mov dword [ebp - 0x58], eax
je 0x100165ae
lea eax, [esi + 0xc]
mov dword [ebp - 0x44], eax
nop dword [eax]
movzx eax, word [ecx + 6]
mov edx, dword [ebp - 0x4c]
add eax, 2
lea eax, [eax + eax*4]
add eax, dword [ecx + 0x74]
mov esi, dword [ecx + eax*8 + 0x10]
mov ecx, dword [ecx + eax*8 + 8]
mov edx, dword [edx + eax*8 + 0x14]
mov dword [ebp - 0x60], ecx
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx + eax*8 + 0xc]
cmp edx, eax
cmovbe edx, eax
cmp esi, dword [ebp - 0x60]
mov eax, dword [ebp - 0x44]
cmovbe esi, dword [ebp - 0x60]
add edx, dword [ebp - 0x50]
add esi, edx
mov edx, dword [eax]
add edx, dword [ebp - 0x50]
cmp edx, esi
jae 0x10016457
mov eax, edx
lea esi, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10016320
sub eax, esi
mov byte [ebp - 0x28], cl
push eax
push edx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
call fcn.10010dd0
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push 0
push dword [ebp - 0x18]
mov dword [ebp - 4], 0
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
lea ecx, [ebp - 0x40]
push 0
push esi
call fcn.100155e0
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
push esi
cmovae ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
push ecx
push dword [ebp - 0x18]
cmovae eax, dword [ebp - 0x28]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
cmp edx, 0x10
jb 0x100163dc
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x100163d2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100165cb
push edx
push ecx
call fcn.10026804
add esp, 8
mov eax, dword [ebp - 0x54]
lea ecx, [ebp - 0x40]
cmp dword [ebp - 0x2c], 8
mov dword [ebp - 4], 1
cmovae ecx, dword [ebp - 0x40]
mov eax, dword [eax]
cmp dword [eax + 0x14], 8
mov edx, dword [eax + 0x10]
jb 0x100163fe
mov eax, dword [eax]
push dword [ebp - 0x30]
push ecx
push edx
push eax
call fcn.100216e0
mov edx, dword [ebp - 0x2c]
add esp, 0x10
mov byte [ebp - 0x45], al
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x10016453
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10016446
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100165cb
push edx
push ecx
call fcn.10026804
mov al, byte [ebp - 0x45]
add esp, 8
test al, al
jne 0x1001646d
add dword [ebp - 0x44], 0x14
inc edi
cmp edi, dword [ebp - 0x58]
jae 0x100165ae
mov ecx, dword [ebp - 0x4c]
jmp 0x100162d0
mov ecx, dword [ebp - 0x5c]
lea eax, [edi + edi*4]
mov esi, dword [ecx + eax*4]
lea edx, [ecx + eax*4]
add esi, dword [ebp - 0x50]
mov dword [ebp - 0x5c], edx
mov eax, dword [esi]
test eax, eax
je 0x100165ae
mov dword [ebp - 0x44], 0
jns 0x100165a0
mov eax, dword [ebp - 0x54]
mov edi, dword [edx + 0x10]
add edi, dword [ebp - 0x50]
mov ecx, dword [eax]
cmp dword [ecx + 0x14], 8
mov edx, dword [ecx + 0x10]
jb 0x100164ac
mov ecx, dword [ecx]
sub esp, 8
mov eax, esp
push edx
push ecx
mov dword [eax], str.dsound.dll
mov dword [eax + 4], 0xa
call fcn.100216e0
add esp, 0x10
test al, al
je 0x1001654b
add edi, dword [ebp - 0x44]
lea eax, [ebp - 0x60]
push eax
push 0x40
push 4
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
movzx eax, word [esi]
dec eax
cmp eax, 0xb
ja case.0x100164eb.4
jmp dword [eax*4 + 0x100165d0]
mov dword [edi], sym.vorbisfile.dll_DirectSoundCaptureCreate
jmp case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_DirectSoundCaptureCreate8
jmp case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_DirectSoundCaptureEnumerateA
jmp case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_DirectSoundCaptureEnumerateW
jmp case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_DirectSoundCreate
jmp case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_DirectSoundCreate8
jmp case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_DirectSoundEnumerateA
jmp case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_DirectSoundEnumerateW
jmp case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_DirectSoundFullDuplexCreate
jmp case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_GetDeviceID
jmp case.0x100164eb.4
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax]
cmp dword [ecx + 0x14], 8
mov edx, dword [ecx + 0x10]
jb 0x1001655b
mov ecx, dword [ecx]
sub esp, 8
mov eax, esp
push edx
push ecx
mov dword [eax], str.dinput8.dll
mov dword [eax + 4], 0xb
call fcn.100216e0
add esp, 0x10
test al, al
je case.0x100164eb.4
add edi, dword [ebp - 0x44]
lea eax, [ebp - 0x4c]
push eax
push 0x40
push 4
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp word [esi], 1
jne case.0x100164eb.4
mov dword [edi], sym.vorbisfile.dll_DirectInput8Create
add dword [ebp - 0x44], 4
mov edx, dword [ebp - 0x5c]
mov eax, dword [esi + 4]
add esi, 4
test eax, eax
jne 0x10016490
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10026812
mov esp, ebp
pop ebp
ret 4
call fcn.1002ebe0
sbb esp, dword [ebp + 1]
adc byte [ebx], ch
add dword gs:[eax], edx
xor esp, dword [ebp + 1]
adc byte [ecx - 1727004315], bl
add dword gs:[eax], edx
add dword fs:[eax], edx
or byte [ebp + 1], ah
adc byte [ebx], dl
add dword gs:[eax], edx
inc ebx
add dword gs:[eax], edx
cmp esp, dword [ebp + 1]
adc byte [ebx], ah
add dword gs:[eax], edx
std
add dword fs:[eax], edx