Function at 0x486f20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x405c
call fcn.004e2820
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x4070]
xor esi, esi
xor eax, eax
mov dword [esp + 0x10], esi
xor ebp, ebp
mov dword [esp + 0x3c], eax
test edi, edi
jne 0x486f5e
push 0x4af3
push str.C:PureBasicSvn_v6.10LibrariesSoundMiniAudiominiaudiominiaudio.h
push str.pDevice_____void__0_
call fcn.005063ca
add esp, 0xc
mov ebx, dword [edi + 4]
cmp ebx, 2
je 0x486f70
cmp ebx, 3
je 0x486f70
cmp ebx, 4
jne 0x486fc5
mov eax, dword [edi]
cmp dword [eax + 0x20], esi
je 0x4874e8
mov eax, dword [edi + 0x920]
xor edx, edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], 3
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], 4
mov ecx, dword [esp + eax*4 + 0x14]
mov eax, 0x1000
imul ecx, dword [edi + 0x924]
div ecx
mov dword [esp + 0x3c], eax
cmp ebx, 1
je 0x486fcf
cmp ebx, 3
jne 0x487022
mov eax, dword [edi]
cmp dword [eax + 0x24], esi
je 0x4874e8
mov eax, dword [edi + 0x3d8]
xor edx, edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], 3
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], 4
mov ecx, dword [esp + eax*4 + 0x14]
mov eax, 0x1000
imul ecx, dword [edi + 0x3dc]
div ecx
mov ebp, eax
xor edx, edx
jmp case.default.0x487059
mov edx, dword [esp + 0x10]
nop word [eax + eax]
xor ecx, ecx
lea ebx, [edi + 0xc]
xor eax, eax
lock cmpxchg dword [ebx], ecx
mov ebx, dword [esp + 0x3c]
cmp eax, 2
jne 0x4874db
test edx, edx
jne 0x4874db
mov eax, dword [edi + 4]
dec eax
cmp eax, 3
ja case.default.0x487059
jmp dword [eax*4 + 0x4874f8]
mov ecx, dword [edi + 0xa2c]
xor edx, edx
mov eax, dword [edi + 0x4e4]
cmp ecx, eax
mov dword [esp + 0x5c], edx
cmovae ecx, eax
mov dword [esp + 0x34], ecx
test ecx, ecx
je 0x487026
nop
sub ecx, edx
lea eax, [esp + 0x64]
mov edx, dword [edi]
cmp ecx, ebx
push eax
mov eax, ebx
cmovbe eax, ecx
push eax
lea eax, [esp + 0x74]
push eax
mov eax, dword [edx + 0x20]
push edi
call eax
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4874cd
mov eax, dword [esp + 0x64]
xor ebx, ebx
mov dword [esp + 0x38], eax
xor edx, edx
mov eax, dword [edi + 0x818]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], 3
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], 4
mov ecx, dword [esp + eax*4 + 0x14]
mov eax, 0x1000
imul ecx, dword [edi + 0x81c]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], 3
div ecx
mov dword [esp + 0x24], 4
xor edx, edx
mov esi, eax
mov dword [esp + 0x28], 4
mov eax, dword [edi + 0x2d0]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x54], ebx
mov ecx, dword [esp + eax*4 + 0x14]
mov eax, 0x1000
imul ecx, dword [edi + 0x2d4]
div ecx
lea ecx, [esp + 0x2c]
push ecx
cmp esi, eax
lea ecx, [esp + 0x3070]
push ecx
cmovb eax, esi
lea ecx, [esp + 0x58]
push ecx
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x78]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x5c], eax
lea eax, [edi + 0xa40]
push ecx
push eax
call fcn.00481ab0
mov edx, dword [esp + 0x24]
mov esi, eax
add esp, 0x14
test esi, esi
jne case.default.0x487059
nop
mov ecx, dword [esp + 0x2c]
mov eax, ecx
or eax, dword [esp + 0x30]
je 0x4873c7
push ecx
lea eax, [esp + 0x3070]
push eax
lea eax, [esp + 0x2074]
push eax
push edi
call fcn.004849a0
mov eax, dword [esp + 0x60]
add ebx, eax
sub dword [esp + 0x48], eax
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x1080]
mov dword [esp + 0x6c], ebx
push eax
lea eax, [esp + 0x60]
mov dword [esp + 0x64], ecx
push eax
lea eax, [esp + 0x2088]
mov dword [esp + 0x5c], ebp
push eax
lea ebx, [edi + 0x4f8]
mov dword [esp + 0x64], 0
push ebx
call fcn.00481ab0
mov esi, eax
add esp, 0x24
test esi, esi
jne 0x487284
mov eax, dword [edi]
lea ecx, [esp + 0x106c]
push 0
push dword [esp + 0x44]
mov eax, dword [eax + 0x24]
push ecx
push edi
call eax
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x487284
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x30]
sbb edx, eax
mov dword [esp + 0x2c], ecx
mov eax, ecx
mov dword [esp + 0x30], edx
or eax, edx
je 0x487296
lea eax, [esp + 0x40]
mov dword [esp + 0x48], ecx
push eax
lea eax, [esp + 0x1070]
mov dword [esp + 0x50], edx
push eax
lea eax, [esp + 0x50]
mov dword [esp + 0x48], ebp
push eax
lea eax, [esp + 0x2078]
mov dword [esp + 0x50], esi
push eax
push ebx
call fcn.00481ab0
mov esi, eax
add esp, 0x14
test esi, esi
je 0x487210
mov ebx, dword [esp + 0x58]
mov edx, 1
mov dword [esp + 0x10], edx
jmp 0x4873cb
mov eax, dword [edi + 0x818]
xor edx, edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], 3
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], 4
mov ecx, dword [esp + eax*4 + 0x14]
mov eax, 0x1000
imul ecx, dword [edi + 0x81c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], 3
div ecx
mov ecx, dword [edi + 0x2d0]
xor edx, edx
mov esi, eax
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], 4
mov eax, 0x1000
mov ebx, dword [esp + 0x58]
mov ecx, dword [esp + ecx*4 + 0x14]
imul ecx, dword [edi + 0x2d4]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], 3
div ecx
mov dword [esp + 0x24], 4
lea ecx, [esp + 0x2c]
cmp esi, eax
mov dword [esp + 0x28], 4
push ecx
cmovb eax, esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x3070]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x54], eax
mov eax, dword [edi + 0x920]
push ecx
lea ecx, [esp + 0x58]
mov dword [esp + 0x5c], 0
push ecx
mov eax, dword [esp + eax*4 + 0x20]
lea ecx, [esp + 0x78]
imul eax, dword [edi + 0x924]
imul eax, ebx
add eax, ecx
push eax
lea eax, [edi + 0xa40]
push eax
call fcn.00481ab0
mov esi, eax
add esp, 0x14
test esi, esi
je 0x487190
mov edx, dword [esp + 0x10]
test ebx, ebx
je case.default.0x487059
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x34]
add edx, ebx
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x5c], edx
cmp edx, ecx
jb 0x487080
jmp 0x487026
mov eax, dword [edi + 0xa2c]
xor ebx, ebx
mov dword [esp + 0x34], eax
test eax, eax
je case.default.0x487059
mov edx, dword [edi]
mov ecx, eax
lea eax, [esp + 0x60]
sub ecx, ebx
push eax
mov eax, dword [esp + 0x40]
cmp ecx, eax
cmovbe eax, ecx
push eax
lea eax, [esp + 0x74]
push eax
mov eax, dword [edx + 0x20]
push edi
call eax
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4874cd
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x10]
test eax, eax
je case.default.0x487059
lea ecx, [esp + 0x6c]
push ecx
push eax
push edi
call fcn.00486cf0
add ebx, dword [esp + 0x6c]
add esp, 0xc
mov eax, dword [esp + 0x34]
cmp ebx, eax
jb 0x487406
jmp 0x487026
mov eax, dword [edi + 0x4e4]
xor ebx, ebx
mov dword [esp + 0x34], eax
test eax, eax
je case.default.0x487059
sub eax, ebx
mov esi, ebp
cmp eax, ebp
cmovbe esi, eax
lea eax, [esp + 0x106c]
push eax
push esi
push edi
call fcn.00486850
mov eax, dword [edi]
lea ecx, [esp + 0x74]
push ecx
push esi
lea ecx, [esp + 0x1080]
mov eax, dword [eax + 0x24]
push ecx
push edi
call eax
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x4874cd
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x10]
test eax, eax
je case.default.0x487059
add ebx, eax
mov eax, dword [esp + 0x34]
cmp ebx, eax
jb 0x487477
jmp 0x487026
mov edx, 1
mov dword [esp + 0x10], edx
jmp case.default.0x487059
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x405c
ret
pop edi
pop esi
pop ebp
mov eax, 0xffffffe3
pop ebx
add esp, 0x405c
ret