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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x80
push ebx
mov edx, dword [0x84e4dc]
push ebp
push esi
mov esi, ecx
push edi
movsx eax, byte [esi + 0x574]
movsx ecx, byte [esi + 0x575]
mov eax, dword [edx + eax*4]
cmp dword [eax + ecx*4 + 0x30], 0xffffffff
sete al
test al, al
jne 0x501d78
mov edx, dword [esi]
lea eax, [esp + 0x6c]
push eax
mov ecx, esi
call dword [edx + 0x48]
lea edi, [esi + 0x45c]
lea ecx, [esp + 0x60]
push edi
push ecx
mov ecx, eax
call fcn.004347b0
mov ecx, eax
call fcn.0041b780
movsx edx, byte [esi + 0x574]
mov dword [esp + 0x20], eax
mov eax, dword [0x84e4dc]
push edi
mov ecx, esi
mov ebp, dword [eax + edx*4]
mov edx, dword [esi]
lea eax, [esp + 0x70]
push eax
call dword [edx + 0x48]
push eax
lea ecx, [esp + 0x44]
call fcn.00423ef0
mov edx, dword [esi + 0x5a8]
mov ecx, dword [eax]
mov dword [esp + 0x3c], ecx
mov eax, dword [edx + 0x5a0]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x28]
mov dword [esp + 0x2c], eax
movsx edx, word [esp + 0x2e]
movsx ecx, ax
mov eax, dword [ebp + 0x24]
shl edx, 8
shl ecx, 8
mov dword [esp + 0x2c], eax
add edx, 0x80
movsx eax, ax
add ecx, 0x80
mov dword [esp + 0x58], edx
movsx edx, word [esp + 0x2e]
mov dword [esp + 0x54], ecx
xor ecx, ecx
shl eax, 8
mov dword [esp + 0x5c], ecx
add eax, 0x80
mov dword [esp + 0x68], ecx
lea ecx, [esp + 0x60]
shl edx, 8
mov dword [esp + 0x60], eax
mov eax, dword [ebp + 0x1c0]
add edx, 0x80
push ecx
mov ecx, 0x81a800
mov dword [esp + 0x68], edx
mov dword [esp + 0x30], eax
call fcn.00556f20
lea edx, [esp + 0x54]
mov ecx, 0x81a800
push edx
mov ebx, eax
call fcn.00556f20
sub eax, ebx
mov ecx, dword [esp + 0x20]
cdq
idiv dword [esp + 0x2c]
mov ebx, eax
mov eax, dword [esp + 0x18]
cmp ecx, eax
mov dword [esp + 0x2c], ebx
jg 0x501c7b
mov al, byte [esi + 0x575]
mov edx, dword [esi]
inc al
push edi
movsx ecx, al
mov byte [esi + 0x575], al
mov eax, dword [ebp + ecx*4 + 0x30]
mov ecx, esi
cmp eax, 0xffffffff
mov dword [esp + 0x34], eax
sete byte [esp + 0x1b]
call dword [edx + 0x19c]
mov al, byte [esp + 0x17]
test al, al
jne 0x501d78
movsx eax, byte [esi + 0x575]
mov edx, dword [edi + 8]
mov ecx, dword [ebp + eax*4 + 0x30]
mov ebp, dword [edi + 4]
and ecx, 7
push edx
mov edx, dword [ecx*8 + 0x839dd0]
lea eax, [ecx*8 + 0x839dd0]
mov ecx, dword [ecx*8 + 0x839dd4]
mov eax, dword [edi]
add ecx, ebp
add edx, eax
push ecx
push edx
lea ecx, [esp + 0x78]
call fcn.0041b630
mov ecx, dword [eax]
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x40]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x5c], edx
push edi
mov eax, dword [eax + 8]
mov ecx, 0x81a800
mov dword [esp + 0x64], eax
call fcn.00545340
mov ecx, eax
call fcn.00475960
mov ebp, eax
lea edx, [esp + 0x78]
lea eax, [esp + 0x54]
push edx
push eax
mov ecx, 0x81a800
call fcn.00545340
mov ecx, eax
call fcn.00475960
mov ecx, dword [eax]
mov edx, dword [ebp]
mov eax, dword [eax + 4]
sub ecx, edx
mov edx, dword [ebp + 4]
mov ebp, edi
sub eax, edx
mov edx, dword [edi]
add edx, ecx
mov ecx, dword [edi + 4]
add ecx, eax
mov eax, dword [edi + 8]
mov dword [ebp], edx
mov edx, dword [esi]
push edi
mov dword [ebp + 4], ecx
mov ecx, esi
mov dword [ebp + 8], eax
mov ebp, dword [esi + 0x464]
lea eax, [esp + 0x7c]
add ebp, ebx
push eax
mov dword [esi + 0x464], ebp
call dword [edx + 0x48]
push eax
lea ecx, [esp + 0x44]
call fcn.00423ef0
mov eax, dword [eax]
lea ecx, [esi + 0x88]
mov ebx, dword [esp + 0x20]
mov edx, dword [ecx]
mov dword [esp + 0x6c], edx
mov edx, dword [ecx + 4]
movsx eax, ax
mov edi, dword [ecx + 8]
mov ecx, dword [esp + 0x18]
sub ecx, ebx
sub eax, 0x3fff
mov dword [esp + 0x20], eax
mov dword [esp + 0x70], edx
fild dword [esp + 0x20]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x18], ecx
fmul qword [0x786620]
fstp qword [esp + 0x20]
fild dword [esp + 0x18]
mov ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
push ebp
push ebx
fstp qword [esp + 0x20]
fild dword [esp + 0x78]
fstp qword [esp + 0x48]
call fcn.004b9fa0
fmul qword [esp + 0x20]
fsubr qword [esp + 0x48]
call fcn.0076a6b0
push ebp
push ebx
mov dword [esp + 0x30], eax
call fcn.004b9ff0
fmul qword [esp + 0x28]
add esp, 0x10
fiadd dword [esp + 0x6c]
call fcn.0076a6b0
mov ecx, dword [esp + 0x20]
push edi
push ecx
push eax
lea ecx, [esp + 0x60]
call fcn.0041b630
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x64], eax
and edx, reloc.DSOUND.dll_DirectSoundCreate
mov dword [esp + 0x68], ecx
jns 0x501c3b
dec edx
or edx, 0xfffffffe
inc edx
je 0x501c45
fld qword [0x78ea28]
jmp 0x501c4b
fld qword [0x785700]
fild dword [esp + 0x3c]
fdiv st(1)
fimul dword [esp + 0x2c]
fiadd dword [esp + 0x5c]
call fcn.0076a6b0
lea ecx, [esp + 0x60]
mov dword [esp + 0x68], eax
mov eax, dword [esi]
push ecx
mov ecx, esi
fstp st(0)
call dword [eax + 0x19c]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
movsx edx, byte [esi + 0x575]
lea eax, [esi + 0x88]
mov ebp, dword [ebp + edx*4 + 0x30]
mov ecx, dword [eax]
mov dword [esp + 0x6c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x70], edx
mov edi, dword [eax + 8]
movsx eax, word [esp + 0x3c]
sub eax, 0x3fff
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fmul qword [0x786620]
fstp qword [esp + 0x30]
fild dword [esp + 0x18]
mov ebx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
push ebx
push ecx
fstp qword [esp + 0x28]
fild dword [esp + 0x78]
fstp qword [esp + 0x48]
call fcn.004b9fa0
fmul qword [esp + 0x28]
fsubr qword [esp + 0x48]
call fcn.0076a6b0
mov edx, dword [esp + 0x38]
push ebx
push edx
mov dword [esp + 0x4c], eax
call fcn.004b9ff0
fmul qword [esp + 0x30]
add esp, 0x10
fiadd dword [esp + 0x6c]
call fcn.0076a6b0
mov ecx, dword [esp + 0x3c]
push edi
push ecx
push eax
lea ecx, [esp + 0x6c]
call fcn.0041b630
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
and ebp, reloc.DSOUND.dll_DirectSoundCreate
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], ecx
jns 0x501d38
dec ebp
or ebp, 0xfffffffe
inc ebp
je 0x501d42
fld qword [0x78ea28]
jmp 0x501d48
fld qword [0x785700]
fld qword [esp + 0x20]
fdiv st(1)
fimul dword [esp + 0x2c]
fiadd dword [esp + 0x68]
call fcn.0076a6b0
mov edx, dword [esi]
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x54]
mov ecx, esi
push eax
fstp st(0)
call dword [edx + 0x19c]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
lea edi, [esi + 0x88]
mov ecx, edi
mov edx, dword [ecx]
mov dword [esp + 0x6c], edx
lea edx, [esp + 0x6c]
mov eax, dword [ecx + 4]
push edx
mov dword [esp + 0x74], eax
mov ecx, dword [ecx + 8]
mov dword [esp + 0x78], ecx
mov ecx, 0x81a800
call fcn.00545340
push 1
push 0
mov ebp, eax
mov eax, dword [esi]
push 0
push 0xffffffffffffffff
mov ebx, dword [ebp + 0xe4]
push ebp
mov ecx, esi
call dword [eax + 0x194]
test eax, eax
je 0x501f16
xor ebp, ebp
lea ecx, [esp + 0x78]
push ebp
push ebp
call fcn.004bf6f0
mov ecx, 0xa
cmp ebx, ebp
mov dword [esp + 0x78], vtable.DynamicVectorClass_class_ObjectClass__.0
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x88], ebp
je 0x501e5a
mov eax, dword [esp + 0x80]
jmp 0x501e02
mov ecx, dword [esp + 0x8c]
cmp dword [esp + 0x88], eax
jl 0x501e34
mov dl, byte [esp + 0x85]
test dl, dl
jne 0x501e1a
cmp eax, ebp
jne 0x501e53
cmp ecx, ebp
jle 0x501e53
mov edx, dword [esp + 0x78]
add eax, ecx
push ebp
push eax
lea ecx, [esp + 0x80]
call dword [edx + 8]
test al, al
je 0x501e4c
mov ecx, dword [esp + 0x88]
mov eax, ecx
inc ecx
mov dword [esp + 0x88], ecx
mov ecx, dword [esp + 0x7c]
mov dword [ecx + eax*4], ebx
mov eax, dword [esp + 0x80]
mov ebx, dword [ebx + 0x30]
cmp ebx, ebp
jne 0x501dfb
mov eax, dword [esp + 0x88]
xor ebx, ebx
cmp eax, ebp
jle 0x501ed6
mov edx, dword [esp + 0x7c]
mov edi, dword [edx + ebx*4]
mov ecx, edi
mov eax, dword [edi]
call dword [eax + 0x2c]
cmp eax, 1
je 0x501e86
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x2c]
cmp eax, 0xf
jne 0x501eca
cmp dword [edi + 0x564], ebp
jne 0x501e98
push 0x80004003
call fcn.00780ec0
mov eax, dword [edi + 0x564]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
test al, al
jne 0x501eca
mov edx, dword [edi]
push 1
lea eax, [esp + 0x70]
push 1
push eax
mov ecx, edi
mov dword [esp + 0x78], ebp
mov dword [esp + 0x7c], ebp
mov dword [esp + 0x80], ebp
call dword [edx + 0x15c]
mov eax, dword [esp + 0x88]
inc ebx
cmp ebx, eax
jl 0x501e67
mov edx, dword [esi]
push ebp
push ebp
mov ecx, esi
call dword [edx + 0x4c8]
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x78], vtable.VectorClass_class_ObjectClass__.0
cmp eax, ebp
je 0x50207c
mov cl, byte [esp + 0x85]
test cl, cl
je 0x50207c
push eax
call fcn.0076d2d5
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
push 0
push 0
mov ecx, dword [eax]
mov dword [esp + 0x74], ecx
lea ecx, [esp + 0x74]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x7c], edx
lea edx, [esp + 0x84]
mov eax, dword [eax + 8]
push edx
mov ecx, ebp
mov dword [esp + 0x84], eax
call fcn.004760b0
mov ecx, dword [eax]
mov dword [esp + 0x40], ecx
lea ecx, [esp + 0x40]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x48], edx
mov ecx, 0x81a800
mov eax, dword [eax + 8]
mov dword [esp + 0x4c], eax
call fcn.00556f20
mov edx, dword [esi]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x40]
mov ecx, esi
push eax
call dword [edx + 0x19c]
mov eax, dword [esi + 0x564]
mov ecx, dword [0xa28d1c]
mov edx, dword [0xa28d20]
mov ebx, dword [0xa28d18]
test eax, eax
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], edx
jne 0x501fab
push 0x80004003
call fcn.00780ec0
mov eax, dword [esi + 0x564]
sub esp, 0xc
mov edx, esp
mov ecx, dword [eax]
push eax
mov dword [edx], ebx
mov ebx, dword [esp + 0x80]
mov dword [edx + 4], ebx
mov ebx, dword [esp + 0x84]
mov dword [edx + 8], ebx
call dword [ecx + 0x78]
mov eax, dword [esi + 0x564]
xor ebx, ebx
cmp eax, ebx
jne 0x501fe8
push 0x80004003
call fcn.00780ec0
mov eax, dword [esi + 0x564]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xac]
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx + 0x11c]
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov edx, dword [edi + 8]
mov dword [esp + 0x70], ecx
lea ecx, [esp + 0x6c]
mov dword [esp + 0x6c], eax
mov eax, dword [esi]
push ecx
mov ecx, esi
mov dword [esp + 0x78], edx
call dword [eax + 0xe8]
cmp dword [esi + 0x494], ebp
jne 0x502052
mov edx, dword [esi]
push 1
lea eax, [esp + 0x70]
push 1
push eax
mov ecx, esi
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
call dword [edx + 0x15c]
jmp 0x502062
mov edx, dword [esi]
push 0x3ff00000
push ebx
mov ecx, esi
call dword [edx + 0x4c8]
mov eax, dword [esi]
push 2
mov ecx, esi
mov byte [esi + 0x574], 0xff
mov byte [esi + 0x57b], 1
call dword [eax + 0x174]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret