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

Disassembly:
sub esp, 0x70
push ebx
push ebp
mov ebp, ecx
push esi
mov cl, byte [esp + 0x88]
push edi
mov eax, dword [ebp + 0x84]
test cl, cl
mov dword [esp + 0x20], eax
jbe 0x563881
xor ecx, ecx
xor edi, edi
mov cx, word [eax + 6]
mov eax, dword [ecx*4 + 0x6ccb20]
cmp eax, edi
mov dword [esp + 0x10], eax
je 0x563883
mov ecx, 0x200000
mov dl, byte [eax + 0x417]
mov bl, byte [esp + 0x84]
cmp dl, bl
jne 0x56386a
cmp word [eax + 0x3cb], di
jne 0x56386a
test dword [eax + 0x3e6], ecx
je 0x563fc1
xor edx, edx
mov dx, word [eax + 0x10]
mov eax, dword [edx*4 + 0x6ccb20]
cmp eax, edi
mov dword [esp + 0x10], eax
jne 0x563844
jmp 0x563883
xor edi, edi
xor eax, eax
mov dword [esp + 0x50], edi
mov ax, word [ebp + 0x12]
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x18], 1
mov ecx, dword [eax*4 + 0x6ccb20]
cmp ecx, edi
je 0x563917
mov al, byte [esp + 0x88]
cmp byte [ecx + 0x37], al
je 0x5638c7
xor edx, edx
mov dx, word [ecx + 8]
mov ecx, dword [edx*4 + 0x6ccb20]
cmp ecx, edi
jne 0x5638af
jmp 0x563917
xor eax, eax
xor edx, edx
mov ax, word [ecx + 0x3e]
mov dx, word [ecx + 0x3a]
add eax, edx
cdq
sub eax, edx
xor edx, edx
mov dx, word [ecx + 0x38]
mov esi, eax
xor eax, eax
mov ax, word [ecx + 0x3c]
mov dword [esp + 0x58], edi
add eax, edx
cdq
sub eax, edx
sar eax, 1
sar esi, 1
shl eax, 0xc
shl esi, 0xc
add eax, 0x800
add esi, 0x800
sub eax, 0x800
sub esi, 0x800
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], esi
mov eax, dword [ebp]
lea ecx, [esp + 0x50]
push ecx
mov ecx, ebp
call dword [eax + 0x1d4]
mov esi, eax
mov al, byte [esi + 0xa]
cmp al, 0x21
jne 0x56397d
mov ebx, dword [esp + 0x50]
mov edx, dword [esp + 0x54]
mov eax, 0x1000
lea ecx, [esp + 0x88]
add ebx, eax
add edx, eax
lea eax, [esp + 0x30]
mov dword [esp + 0x54], edx
mov edx, dword [ebp]
push eax
push ecx
mov cx, word [0x6d0b2c]
lea eax, [esp + 0x58]
mov dword [esp + 0x58], ebx
push eax
push ecx
push 0x137
mov ecx, ebp
mov word [esp + 0x9c], di
call dword [edx + 0x38c]
jmp 0x563981
cmp al, 0x25
jne 0x563985
mov dword [esp + 0x18], edi
xor edx, edx
mov dx, word [esi]
mov esi, dword [edx*4 + 0x6ccb20]
cmp esi, edi
je 0x5639e6
mov eax, dword [esi + 0x12]
cmp eax, 4
je 0x5639a2
cmp eax, 3
jne 0x5639d5
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x20]
mov edx, dword [ebp]
lea eax, [esp + 0x30]
lea ecx, [esp + 0x88]
push eax
push ecx
mov cx, word [esi + 0x28]
lea eax, [esp + 0x58]
mov word [esp + 0x90], di
push eax
push ecx
push 1
mov ecx, ebp
call dword [edx + 0x38c]
xor edx, edx
mov dx, word [esi + 0xc]
mov esi, dword [edx*4 + 0x6ccb20]
cmp esi, edi
jne 0x563995
mov eax, dword [esp + 0x84]
and eax, 0xff
mov ebx, eax
mov dword [esp + 0x28], eax
shl ebx, 6
add ebx, eax
shl ebx, 3
mov dword [esp + 0x24], ebx
mov ax, word [ebp + ebx + 0x4030]
cmp ax, di
je 0x563a1b
push 1
push eax
mov ecx, ebp
call fcn.005632b0
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0xc4]
xor edx, edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], edx
mov ecx, edx
lea edi, [esp + 0x5c]
shl ecx, 5
add ecx, ebp
lea esi, [ecx + ebx + 0x4038]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x78]
test al, al
je 0x563e4e
mov cl, byte [esp + 0x8c]
test cl, cl
jbe 0x563abb
test edx, edx
jne 0x563a71
mov edx, dword [ebp]
mov bl, 0xe
mov byte [esp + 0x14], bl
push 0xe
jmp 0x563ac5
lea edi, [ebp + 0x15a0]
mov eax, dword [esp + 0x2c]
push 0x632
push 0x7b1c9c
push edi
push eax
call fcn.0059cec2
mov edx, dword [ebp]
mov ebx, eax
add esp, 0x10
inc bl
mov byte [esp + 0x14], bl
mov ecx, ebp
mov eax, dword [esp + 0x14]
push eax
call dword [edx + 0xc0]
mov esi, eax
test esi, esi
je 0x563a77
test dword [esi + 0x686], 0x40000000
je 0x563a77
jmp 0x563acf
mov edx, dword [ebp]
mov bl, al
mov byte [esp + 0x14], bl
push eax
mov ecx, ebp
call dword [edx + 0xc0]
mov esi, eax
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x54]
push ecx
mov cx, word [eax + 4]
push edx
push ecx
mov ecx, ebp
call fcn.005633a6
test eax, eax
je 0x563fd0
cmp bl, 0x15
jne 0x563b40
xor edx, edx
mov dx, word [ebp + 0x7a]
mov edi, dword [edx*4 + 0x6ccb20]
test edi, edi
je 0x563b40
lea ebx, [ebp + 0x2e54]
mov ecx, dword [esp + 0x10]
mov dx, word [edi + 4]
xor eax, eax
push 1
mov ax, word [ecx + 4]
mov ecx, ebx
push eax
push 1
push edx
push 5
call fcn.0050feb3
xor eax, eax
mov ax, word [edi + 0x3a]
mov edi, dword [eax*4 + 0x6ccb20]
test edi, edi
jne 0x563b12
mov ebx, dword [esp + 0x6a]
mov al, bl
dec al
mov byte [esp + 0x88], al
mov al, byte [esp + 0x8c]
test al, al
jbe 0x563b6d
mov ecx, dword [esp + 0x28]
push ecx
mov ecx, ebp
call fcn.005597ef
add byte [esp + 0x88], al
mov eax, dword [esp + 0x88]
mov ecx, 0xa
and eax, 0xff
cdq
idiv ecx
cmp bl, 1
mov byte [esp + 0x88], dl
jne 0x563b98
xor edx, edx
mov dx, word [esi + 0x69c]
jmp 0x563bca
mov eax, dword [0x6c2734]
mov edx, ebx
and edx, 0xff
movsx ecx, word [eax + edx*2 + 0x13b]
xor edx, edx
mov eax, 0x51eb851f
mov dx, word [esi + 0x69c]
imul ecx, edx
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x34], edx
and ecx, 0xffff
mov dword [esp + 0x38], 0
mov dword [esp + 0x30], ecx
fild dword [esp + 0x30]
fmul qword [0x7db764]
fild qword [esp + 0x34]
fmulp st(1)
call fcn.00674a84
mov ecx, dword [esp + 0x10]
push eax
call fcn.004d82ca
mov edi, dword [esp + 0x10]
cmp bl, 1
jne 0x563c17
xor edx, edx
mov dx, word [esi + 0x692]
jmp 0x563c48
mov edx, dword [0x6c2734]
and ebx, 0xff
xor eax, eax
movsx ecx, word [edx + ebx*2 + 0xe1]
mov ax, word [esi + 0x692]
imul ecx, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [esp + 0x70]
xor ebx, ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ebx
fild qword [esp + 0x3c]
mov ax, word [0x6d0b2c]
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], ebx
push ebx
fmul qword [0x7db764]
fild qword [esp + 0x48]
push eax
fmulp st(1)
call fcn.00674a84
mov esi, dword [edi + 0x40]
mov ecx, edi
sub eax, esi
push eax
call fcn.004fedf9
mov eax, dword [esp + 0x88]
xor esi, esi
and eax, 0xff
jbe 0x563ca8
mov edi, eax
mov esi, eax
mov ecx, dword [esp + 0x10]
call fcn.004d8559
dec edi
jne 0x563c9c
mov edx, dword [esp + 0x10]
mov cl, byte [esp + 0x79]
mov dword [edx + 0x38], ebx
mov eax, dword [esp + 0x10]
mov byte [eax + 0x418], cl
mov edx, dword [esp + 0x10]
mov al, byte [esp + 0x7a]
xor ecx, ecx
mov byte [edx + 0x417], al
mov eax, dword [esp + 0x76]
test al, al
je 0x563cf8
and eax, 0xff
mov ecx, eax
shl ecx, 4
add ecx, eax
lea edx, [eax + ecx*8]
lea ecx, [eax + edx*8]
lea edx, [eax + ecx*4]
mov eax, dword [ebp + 0x84]
mov cx, word [edx + eax - 0x1121]
mov al, byte [esp + 0x8c]
test al, al
jbe 0x563d11
cmp esi, ebx
jne 0x563d11
mov edx, dword [esp + 0x6c]
push edx
push ecx
push 0x13
jmp 0x563d22
mov eax, dword [esp + 0x6c]
push eax
push ecx
mov ecx, dword [esp + 0x7f]
and ecx, 0xff
push ecx
mov ecx, dword [esp + 0x1c]
call fcn.004d920b
mov esi, dword [esp + 0x6b]
mov ecx, dword [esp + 0x10]
and esi, 0xff
mov edx, esi
and edx, 1
push edx
call fcn.004db24f
mov ecx, dword [esp + 0x10]
mov eax, esi
shr eax, 1
and eax, 1
push eax
call fcn.004db273
mov ecx, esi
shr ecx, 2
and ecx, 1
push ecx
mov ecx, dword [esp + 0x14]
call fcn.004db297
mov ecx, dword [esp + 0x10]
mov edx, esi
shr edx, 3
and edx, 1
push edx
call fcn.004db2bb
mov ecx, dword [esp + 0x10]
mov eax, esi
shr eax, 6
and eax, 1
push eax
call fcn.004db303
mov ecx, esi
shr ecx, 7
push ecx
mov ecx, dword [esp + 0x14]
call fcn.004db327
mov ecx, dword [esp + 0x10]
shr esi, 5
and esi, 1
push esi
call fcn.004db2df
mov esi, dword [esp + 0x7b]
mov ecx, dword [esp + 0x10]
and esi, 0xff
mov edx, esi
and edx, 1
push edx
call fcn.004db36f
mov ecx, dword [esp + 0x10]
mov eax, esi
shr eax, 1
and eax, 1
push eax
call fcn.004db38d
mov ecx, esi
shr ecx, 3
and ecx, 1
push ecx
mov ecx, dword [esp + 0x14]
call fcn.004db3ab
mov ecx, dword [esp + 0x10]
shr esi, 2
and esi, 1
push esi
call fcn.004db40b
mov esi, dword [esp + 0x74]
mov ecx, dword [esp + 0x10]
push esi
call fcn.004e7370
cmp si, bx
je 0x563e13
push 1
push esi
mov ecx, ebp
call fcn.005632b0
mov ecx, dword [esp + 0x10]
push ebx
push ebx
push 3
call fcn.004e7443
cmp dword [esp + 0x18], ebx
je 0x563e46
mov ecx, dword [esp + 0x10]
push 0x10d
call fcn.004d819c
mov ecx, dword [esp + 0x10]
mov al, byte [ecx + 0xf3]
and al, 0xfe
mov byte [ecx + 0xf3], al
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
inc edx
cmp edx, 0x10
mov dword [esp + 0x1c], edx
jb 0x563a30
mov eax, dword [esp + 0x28]
xor edi, edi
xor bl, bl
mov dword [esp + 0x88], edi
mov dl, byte [ebp + eax + 0x70f0]
mov esi, DirectSoundCreate
inc dl
mov byte [ebp + eax + 0x70f0], dl
mov eax, dword [esp + 0x20]
xor edx, edx
mov dx, word [eax + 6]
mov eax, dword [edx*4 + 0x6ccb20]
cmp eax, edi
mov dword [esp + 0x10], eax
je 0x563ee4
mov dl, 2
mov cl, byte [esp + 0x84]
cmp byte [eax + 0x417], cl
jne 0x563ecf
mov ecx, dword [eax + 0x370]
mov ecx, dword [ecx + 0x5b4]
cmp esi, ecx
jbe 0x563ebc
mov esi, ecx
test byte [eax + 0x46f], dl
je 0x563ecf
mov di, word [eax + 4]
mov dword [esp + 0x88], eax
xor ecx, ecx
mov cx, word [eax + 0x10]
mov eax, dword [ecx*4 + 0x6ccb20]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x563e9b
mov eax, dword [esp + 0x18]
test eax, eax
je 0x563f49
mov edx, edi
mov word [esp + 0x8c], 0
and edx, 0xffff
mov eax, dword [edx*4 + 0x6ccb20]
lea ecx, [eax + 0x1a]
mov edx, dword [eax + 0x1a]
mov dword [esp + 0x44], edx
mov edx, dword [ecx + 4]
mov dword [esp + 0x48], edx
mov edx, dword [ebp]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x4c], ecx
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x90]
push ecx
mov dword [esp + 0x54], 0x2000
mov ax, word [eax + 0x28]
lea ecx, [esp + 0x4c]
push ecx
push eax
push 0x2b
mov ecx, ebp
call dword [edx + 0x38c]
mov edx, dword [esp + 0x20]
xor ecx, ecx
mov cx, word [edx + 6]
mov ecx, dword [ecx*4 + 0x6ccb20]
test ecx, ecx
mov dword [esp + 0x10], ecx
je 0x563fb4
mov al, byte [esp + 0x84]
mov dl, byte [ecx + 0x417]
cmp dl, al
jne 0x563f9f
push esi
push 0
call fcn.004d5c69
mov ecx, dword [esp + 0x10]
test byte [ecx + 0x46f], 4
je 0x563f9f
mov word [ecx + 0x3df], di
mov ecx, dword [esp + 0x10]
inc bl
mov byte [ecx + 0x3e1], bl
mov ecx, dword [esp + 0x10]
xor edx, edx
mov dx, word [ecx + 0x10]
mov ecx, dword [edx*4 + 0x6ccb20]
test ecx, ecx
mov dword [esp + 0x10], ecx
jne 0x563f62
mov eax, dword [esp + 0x88]
mov byte [eax + 0x3e1], bl
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x70
ret 0xc