Function at 0x10004910
Capabilities:
Enumerate files on windows
Get common file path
Link many functions at runtime

Disassembly:
sub esp, 0x798
mov eax, dword [0x100163f4]
xor eax, esp
mov dword [esp + 0x794], eax
cmp dword [0x10017650], 0
jne 0x10004937
call dword [sym.imp.WINMM.dll_waveOutGetNumDevs]
test eax, eax
jne 0x10004952
cmp dword [0x10017654], 0
jne 0x1000546e
call dword [sym.imp.WINMM.dll_waveInGetNumDevs]
test eax, eax
je 0x1000546e
push ebx
push 0x413
lea eax, [esp + 0x285]
push 0
push eax
mov byte [esp + 0x28c], 0
call fcn.10006510
push 0x104
lea ecx, [esp + 0x290]
push ecx
push 0x10012b08
xor ebx, ebx
call fcn.10002fa0
add esp, 0x18
test eax, eax
je 0x10004994
mov ebx, 1
push edi
lea edx, [esp + 0x389]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edi, [esp + 0x389]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x100049b2
mov ax, word [0x10012b04]
push 0x104
lea ecx, [esp + 0x492]
push ecx
push 0
mov word [edi], ax
call fcn.10002fa0
add esp, 0xc
push 0x104
lea edx, [esp + 0x597]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [esp + 0x593]
add edi, 0xffffffff
lea esp, [esp]
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x10004a00
mov ax, word [0x10012b04]
add ebx, 3
push esi
xor esi, esi
test ebx, ebx
mov word [edi], ax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x24], esi
jle 0x10004ff6
push ebp
lea ebx, [ebx]
test esi, esi
jne 0x10004a6d
lea ecx, [esp + 0x59b]
lea eax, [esp + 0x28c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10004b12
test dl, dl
je 0x10004a66
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10004b12
add eax, 2
add ecx, 2
test dl, dl
jne 0x10004a42
xor eax, eax
jmp 0x10004b17
cmp esi, 2
jne 0x10004aa4
lea ecx, [esp + 0x391]
lea eax, [esp + 0x496]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10004b12
test dl, dl
je 0x10004aa0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10004b12
add eax, 2
add ecx, 2
test dl, dl
jne 0x10004a80
xor eax, eax
jmp 0x10004b17
cmp esi, 3
jne 0x10004b1f
lea ecx, [esp + 0x496]
lea eax, [esp + 0x59b]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10004ad7
test dl, dl
je 0x10004ad3
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10004ad7
add eax, 2
add ecx, 2
test dl, dl
jne 0x10004ab7
xor eax, eax
jmp 0x10004adc
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10004fe6
lea ecx, [esp + 0x391]
lea eax, [esp + 0x59b]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10004b12
test dl, dl
je 0x10004b0e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10004b12
add eax, 2
add ecx, 2
test dl, dl
jne 0x10004af2
xor eax, eax
jmp 0x10004b17
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10004fe6
mov ecx, esi
imul ecx, ecx, 0x105
lea eax, [esp + ecx + 0x28c]
lea ebp, [esp + 0x184]
sub ebp, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebp
nop
mov cl, byte [eax]
mov byte [eax + ebp], cl
add eax, 1
test cl, cl
jne 0x10004b40
lea eax, [esp + 0x184]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x10004b56
mov edx, dword [str.oal.dll]
mov ecx, dword [0x10012afc]
mov dword [eax], edx
mov dl, byte [0x10012b00]
mov dword [eax + 4], ecx
mov byte [eax + 8], dl
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x188]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x34], eax
je 0x10004fe6
lea ebx, [ebx]
mov eax, dword [esp + 0x3c]
mov cl, byte [eax]
mov byte [eax + ebp], cl
add eax, 1
test cl, cl
jne 0x10004ba4
lea eax, [esp + 0x70]
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004bb6
lea edi, [esp + 0x184]
sub eax, edx
add edi, 0xffffffff
jmp 0x10004bd0
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x10004bd0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x184]
mov byte [esp + eax + 0x6a0], cl
add eax, 1
test cl, cl
jne 0x10004bf0
lea edx, [esp + 0x6a0]
push edx
call fcn.1000615f
lea eax, [esp + 0x6a4]
push str.OPENAL32.DLL
push eax
call fcn.10005f1a
add esp, 0xc
test eax, eax
jne 0x10004fac
lea ecx, [esp + 0x184]
push 0x5c
push ecx
call fcn.10005dc8
mov esi, eax
add esp, 8
test esi, esi
je 0x10004c4c
add esi, 1
jmp 0x10004c53
lea esi, [esp + 0x184]
mov edx, dword [0x10017650]
push esi
push edx
call fcn.10003190
add esp, 8
test al, al
jne 0x10004fac
mov eax, dword [0x10017654]
push esi
push eax
call fcn.10003190
add esp, 8
test al, al
jne 0x10004fac
mov ecx, dword [0x10017658]
push esi
push ecx
call fcn.10003190
add esp, 8
test al, al
jne 0x10004fac
lea edx, [esp + 0x184]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x10004fac
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.alcOpenDevice
push ebx
call esi
push str.alcCreateContext
push ebx
mov edi, eax
call esi
push str.alcMakeContextCurrent
push ebx
mov ebp, eax
call esi
push str.alcGetString
push ebx
mov dword [esp + 0x2c], eax
call esi
push str.alcDestroyContext
push ebx
mov dword [esp + 0x24], eax
call esi
push str.alcCloseDevice
push ebx
mov dword [esp + 0x34], eax
call esi
push str.alcIsExtensionPresent
push ebx
mov dword [esp + 0x38], eax
call esi
test edi, edi
mov dword [esp + 0x20], eax
je 0x10004fa1
test ebp, ebp
je 0x10004fa1
cmp dword [esp + 0x24], 0
je 0x10004fa1
cmp dword [esp + 0x1c], 0
je 0x10004fa1
cmp dword [esp + 0x2c], 0
je 0x10004fa1
cmp dword [esp + 0x30], 0
je 0x10004fa1
test eax, eax
je 0x10004fa1
push str.ALC_ENUMERATE_ALL_EXT
push 0
mov byte [esp + 0x1f], 0
call eax
add esp, 8
test al, al
je 0x10004dd3
push 0x1013
push 0
call dword [esp + 0x24]
mov esi, eax
add esp, 8
test esi, esi
je 0x10004dd8
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004d78
sub eax, edx
je 0x10004dd8
jmp 0x10004d90
push 0x10017658
lea eax, [esp + 0x188]
push eax
push esi
call fcn.10003090
mov eax, esi
add esp, 0xc
lea edx, [eax + 1]
jmp 0x10004db0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004db0
sub eax, edx
lea esi, [esi + eax + 1]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004dc4
sub eax, edx
jne 0x10004d90
jmp 0x10004dd8
mov byte [esp + 0x17], 1
push str.ALC_ENUMERATION_EXT
push 0
call dword [esp + 0x28]
add esp, 8
test al, al
je 0x10004e86
push 0x1005
push 0
call dword [esp + 0x24]
mov esi, eax
add esp, 8
test esi, esi
je 0x10004f13
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004e10
sub eax, edx
je 0x10004f13
push 0x10017650
lea ecx, [esp + 0x188]
push ecx
push esi
call fcn.10003090
add esp, 0xc
cmp byte [esp + 0x17], 0
je 0x10004e54
push 0x10017658
lea edx, [esp + 0x188]
push edx
push esi
call fcn.10003090
add esp, 0xc
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004e60
sub eax, edx
lea esi, [esi + eax + 1]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004e74
sub eax, edx
jne 0x10004e21
jmp 0x10004f13
push 0
call edi
mov edi, eax
add esp, 4
test edi, edi
je 0x10004f13
push 0
push edi
call ebp
mov ebp, eax
push ebp
call dword [esp + 0x30]
add esp, 0xc
test ebp, ebp
je 0x10004f13
push 0x1005
push edi
call dword [esp + 0x24]
mov esi, eax
add esp, 8
test esi, esi
je 0x10004f00
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004ec0
sub eax, edx
je 0x10004f00
push 0x10017650
lea eax, [esp + 0x188]
push eax
push esi
call fcn.10003090
add esp, 0xc
cmp byte [esp + 0x17], 0
je 0x10004f00
push 0x10017658
lea ecx, [esp + 0x188]
push ecx
push esi
call fcn.10003090
add esp, 0xc
push 0
call dword [esp + 0x28]
push ebp
call dword [esp + 0x34]
push edi
call dword [esp + 0x3c]
add esp, 0xc
lea edx, [esp + 0x6a0]
push str.CT_OAL.DLL
push edx
call fcn.10005f1a
add esp, 8
test eax, eax
jne 0x10004fa1
push str.ALC_EXT_CAPTURE
push eax
call dword [esp + 0x28]
add esp, 8
test al, al
je 0x10004fa1
push 0x310
push 0
call dword [esp + 0x24]
mov esi, eax
add esp, 8
test esi, esi
je 0x10004fa1
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004f54
sub eax, edx
je 0x10004fa1
push 0x10017654
lea eax, [esp + 0x188]
push eax
push esi
call fcn.10003090
mov eax, esi
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004f80
sub eax, edx
lea esi, [esi + eax + 1]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10004f94
sub eax, edx
jne 0x10004f61
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebp, dword [esp + 0x40]
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x44]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x10004ba0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x10004ba0
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
add esi, 1
cmp esi, ebx
mov dword [esp + 0x28], esi
jl 0x10004a30
pop ebp
mov ecx, dword [0x10017650]
xor ebx, ebx
cmp ecx, ebx
mov dword [esp + 0xc], ebx
je 0x100051bf
xor esi, esi
cmp ecx, ebx
je 0x1000502b
mov eax, dword [ecx]
lea edi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x10005015
mov ecx, dword [ecx + 8]
sub eax, edi
cmp ecx, ebx
lea esi, [esi + eax + 1]
jne 0x10005010
add esi, 1
push esi
call fcn.10006440
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [0x10017660], eax
je 0x10005089
push esi
push ebx
push eax
call fcn.10006510
mov esi, dword [0x10017650]
add esp, 0xc
cmp esi, ebx
je 0x10005089
mov ecx, dword [esi]
mov edx, edi
jmp 0x10005060
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x10005060
mov eax, dword [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10005073
mov esi, dword [esi + 8]
sub eax, edx
cmp esi, ebx
lea edi, [edi + eax + 1]
jne 0x10005057
lea ecx, [esp + 0xc]
push ecx
call fcn.100043b0
add esp, 4
test al, al
je 0x100051bf
mov edx, dword [esp + 0xc]
mov eax, dword [0x10017650]
push 0x1001765c
push 1
push edx
push eax
call fcn.10003250
add esp, 0x10
test al, al
jne 0x100051ae
mov ecx, dword [esp + 0xc]
push str.X_Fi
push ecx
call fcn.10005c00
add esp, 8
test eax, eax
je 0x100050f8
mov edx, dword [0x10017650]
push 0x1001765c
push ebx
push str.X_Fi
push edx
call fcn.10003250
add esp, 0x10
test al, al
jne 0x100051ae
mov eax, dword [esp + 0xc]
push str.Audigy
push eax
call fcn.10005c00
add esp, 8
test eax, eax
je 0x10005130
mov ecx, dword [0x10017650]
push 0x1001765c
push ebx
push str.Audigy
push ecx
call fcn.10003250
add esp, 0x10
test al, al
jne 0x100051ae
mov edx, dword [0x10017650]
push 0x1001765c
push ebx
push str.Generic_Hardware
push edx
call fcn.10003250
add esp, 0x10
test al, al
jne 0x100051ae
mov eax, dword [0x10017650]
push 0x1001765c
push ebx
push str.Generic_Software
push eax
call fcn.10003250
add esp, 0x10
test al, al
jne 0x100051ae
mov ecx, dword [0x10017650]
mov eax, dword [ecx]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10005176
sub eax, edx
add eax, 1
push eax
call fcn.10006440
add esp, 4
cmp eax, ebx
mov dword [0x1001765c], eax
je 0x100051ae
mov edx, dword [0x10017650]
mov ecx, dword [edx]
mov edx, eax
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x100051a0
mov eax, dword [esp + 0xc]
push eax
call fcn.1000658a
add esp, 4
mov dword [esp + 0xc], ebx
mov ecx, dword [0x10017654]
cmp ecx, ebx
je 0x1000532f
xor esi, esi
cmp ecx, ebx
je 0x100051ee
mov eax, dword [ecx]
lea edi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x100051d8
mov ecx, dword [ecx + 8]
sub eax, edi
cmp ecx, ebx
lea esi, [esi + eax + 1]
jne 0x100051d3
add esi, 1
push esi
call fcn.10006440
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [0x10017668], eax
je 0x1000524d
push esi
push ebx
push eax
call fcn.10006510
mov esi, dword [0x10017654]
add esp, 0xc
cmp esi, ebx
je 0x1000524d
lea ebx, [ebx]
mov ecx, dword [esi]
mov edx, edi
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x10005224
mov eax, dword [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10005237
mov esi, dword [esi + 8]
sub eax, edx
cmp esi, ebx
lea edi, [edi + eax + 1]
jne 0x10005220
lea ecx, [esp + 0xc]
push ecx
call fcn.10004510
add esp, 4
test al, al
je 0x1000532f
mov edx, dword [esp + 0xc]
mov eax, dword [0x10017654]
push 0x10017664
push 1
push edx
push eax
call fcn.10003250
add esp, 0x10
test al, al
jne 0x1000531e
mov edx, dword [esp + 0xc]
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10005290
sub eax, esi
cmp eax, 0x1f
jbe 0x100052c2
push 0x10017664
mov byte [edx + 0x1f], cl
mov ecx, dword [esp + 0x10]
mov edx, dword [0x10017654]
push 1
push ecx
push edx
call fcn.10003250
add esp, 0x10
test al, al
jne 0x1000531e
push str.OPENA32DLL___Still_didnt_find_exact_match__picking_first_n
call fcn.10006770
mov eax, dword [0x10017654]
mov eax, dword [eax]
add esp, 4
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100052e0
sub eax, edx
add eax, 1
push eax
call fcn.10006440
add esp, 4
cmp eax, ebx
mov dword [0x10017664], eax
je 0x1000531e
mov ecx, dword [0x10017654]
mov ecx, dword [ecx]
mov edx, eax
lea ebx, [ebx]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x10005310
mov edx, dword [esp + 0xc]
push edx
call fcn.1000658a
add esp, 4
mov dword [esp + 0xc], ebx
mov ecx, dword [0x10017658]
cmp ecx, ebx
je 0x1000546b
xor esi, esi
cmp ecx, ebx
je 0x1000535e
mov eax, dword [ecx]
lea edi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x10005348
mov ecx, dword [ecx + 8]
sub eax, edi
cmp ecx, ebx
lea esi, [esi + eax + 1]
jne 0x10005343
add esi, 1
push esi
call fcn.10006440
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [0x10017670], eax
je 0x100053bd
push esi
push ebx
push eax
call fcn.10006510
mov esi, dword [0x10017658]
add esp, 0xc
cmp esi, ebx
je 0x100053bd
lea ebx, [ebx]
mov ecx, dword [esi]
mov edx, edi
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x10005394
mov eax, dword [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100053a7
mov esi, dword [esi + 8]
sub eax, edx
cmp esi, ebx
lea edi, [edi + eax + 1]
jne 0x10005390
lea eax, [esp + 0xc]
push eax
call fcn.100043b0
add esp, 4
test al, al
je 0x1000546b
mov ecx, dword [0x1001765c]
mov edx, dword [0x10017658]
push 0x1001766c
push 1
push ecx
push edx
call fcn.10003250
add esp, 0x10
test al, al
jne 0x1000545e
mov eax, dword [esp + 0xc]
mov ecx, dword [0x10017658]
push 0x1001766c
push ebx
push eax
push ecx
call fcn.10003250
add esp, 0x10
test al, al
jne 0x1000545e
mov edx, dword [0x10017658]
mov eax, dword [edx]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10005420
sub eax, edx
add eax, 1
push eax
call fcn.10006440
add esp, 4
cmp eax, ebx
mov dword [0x1001766c], eax
je 0x1000545e
mov ecx, dword [0x10017658]
mov ecx, dword [ecx]
mov edx, eax
lea ebx, [ebx]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x10005450
mov edx, dword [esp + 0xc]
push edx
call fcn.1000658a
add esp, 4
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x794]
xor ecx, esp
call fcn.100063e2
add esp, 0x798
ret