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

Disassembly:
push 0xffffffffffffffff
push 0x51ea16
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xbc
mov eax, dword [0x565e78]
push ebx
push ebp
push edi
mov edi, dword [esp + 0xd8]
mov dword [esp + 0xc4], eax
xor ebp, ebp
mov dword [esp + 0x10], ebp
mov eax, dword [edi + 0x11a8]
sub eax, 0x10
push eax
call fcn.00401c20
lea ebx, [eax + 0x10]
add esp, 4
mov dword [esp + 0x18], ebx
mov dword [esp + 0xd0], ebp
cmp dword [edi + 0x1b4c], 1
jne 0x41c804
lea eax, [edi + 0x1b50]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040f190
mov ebx, dword [esp + 0x18]
mov eax, dword [ebx - 0xc]
cmp eax, ebp
je 0x41cd6e
push esi
lea esi, [esp + 0xac]
call fcn.0041d2c0
lea ecx, [esp + 0x44]
mov byte [esp + 0xd4], 1
call fcn.004fd847
mov byte [esp + 0xd4], 2
cmp dword [esp + 0xc4], 0x10
mov eax, dword [esp + 0xb0]
jae 0x41c84d
lea eax, [esp + 0xb0]
push ebp
push 0x1001
push eax
lea ecx, [esp + 0x50]
call fcn.004fdadf
test eax, eax
je 0x41c95c
mov eax, dword [ebx - 0xc]
cdq
and edx, 7
add eax, edx
sar eax, 3
lea eax, [eax*8 + 8]
mov dword [esp + 0x10], eax
inc eax
push eax
call fcn.004fa771
mov edi, eax
mov edx, edi
add esp, 4
mov eax, ebx
sub edx, ebx
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x41c890
mov esi, dword [esp + 0x10]
mov eax, esi
cdq
sub eax, edx
sar eax, 1
xor ecx, ecx
cmp eax, ebp
jle 0x41c8ea
jmp 0x41c8b0
mov edx, ecx
and edx, reloc.DSOUND.dll_DirectSoundCreate
jns 0x41c8bf
dec edx
or edx, 0xfffffffe
inc edx
jne 0x41c8de
mov bl, byte [ecx + edi]
add eax, ecx
mov al, byte [eax + edi]
mov byte [ecx + edi], al
mov eax, dword [esp + 0x10]
cdq
sub eax, edx
sar eax, 1
add eax, ecx
mov byte [eax + edi], bl
mov esi, dword [esp + 0x10]
mov eax, esi
cdq
sub eax, edx
inc ecx
sar eax, 1
cmp ecx, eax
jl 0x41c8b0
mov eax, esi
cdq
and edx, 7
add eax, edx
sar eax, 3
test eax, eax
jle 0x41c924
mov esi, dword [esp + 0xdc]
add esi, 0xc4
mov ebx, edi
mov edx, ebx
call fcn.00403160
mov eax, dword [esp + 0x10]
cdq
and edx, 7
add eax, edx
inc ebp
sar eax, 3
add ebx, 8
cmp ebp, eax
jl 0x41c908
push 4
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x4c]
call fcn.004fd59a
mov edx, dword [esp + 0x10]
push edx
push edi
lea ecx, [esp + 0x4c]
call fcn.004fd59a
push edi
call fcn.004fa776
add esp, 4
lea ecx, [esp + 0x44]
call fcn.004fd7e5
mov edi, dword [esp + 0xdc]
call fcn.004fa853
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x24], eax
mov byte [esp + 0xd4], 3
mov eax, dword [0x56bb0c]
push eax
lea ecx, [esp + 0x28]
push 0x53e840
push ecx
call fcn.00405820
xor eax, eax
add esp, 0xc
add edi, 0xb4
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], edi
mov edx, dword [esp + 0x20]
mov dword [esp + 0x18], eax
mov eax, dword [edx + 4]
test eax, eax
je 0x41cb72
mov ecx, edx
mov ecx, dword [ecx + 8]
sub ecx, eax
mov eax, 0x2e8ba2e9
imul ecx
mov ecx, dword [esp + 0x10]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jae 0x41cb72
mov esi, dword [esp + 0x1c]
mov eax, esi
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x41c9f4
sub eax, ecx
push eax
push esi
lea ecx, [esp + 0x30]
call fcn.00401b10
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + 0x2c]
or edx, 1
cmp ecx, 0x10
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0xdc]
mov eax, dword [edx + 0xb8]
jae 0x41ca31
lea edi, [esp + 0x2c]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + eax + 0x18]
lea ecx, [ecx + eax + 0x18]
mov ecx, edx
cmp ecx, edx
jae 0x41ca43
test edx, edx
mov ebp, dword [esp + 0x3c]
je 0x41ca77
cmp edx, ebp
mov ecx, edx
jb 0x41ca53
mov ecx, ebp
mov esi, dword [esp + 0x18]
cmp dword [esi + eax + 0x1c], 0x10
jb 0x41ca64
mov esi, dword [esi + eax + 8]
jmp 0x41ca68
lea esi, [esi + eax + 8]
xor ebx, ebx
repe cmpsb byte [esi], byte es:[edi]
je 0x41ca73
sbb ebx, ebx
sbb ebx, 0xffffffff
test ebx, ebx
jne 0x41cab3
cmp edx, ebp
jb 0x41cab3
xor ebx, ebx
cmp edx, ebp
setne bl
test ebx, ebx
jne 0x41cab3
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
lea edx, [edx + eax + 0x3c]
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41ca97
sub eax, esi
push eax
push edi
push edx
xor eax, eax
call fcn.00421b00
cmp eax, 0xffffffff
je 0x41cab3
mov bl, 1
jmp 0x41cab5
xor bl, bl
mov dword [esp + 0xd4], 3
test byte [esp + 0x14], 1
je 0x41cafd
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x40]
and ecx, 0xfffffffe
cmp eax, 0x10
mov dword [esp + 0x14], ecx
jb 0x41cae8
mov eax, dword [esp + 0x2c]
push eax
call fcn.004fa776
add esp, 4
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
test bl, bl
jne 0x41cb16
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
inc ecx
mov dword [esp + 0x10], ecx
add eax, 0x58
jmp 0x41c99f
mov edi, dword [esp + 0xdc]
cmp dword [edi + 0x11b0], 1
jne 0x41cb60
mov esi, dword [esp + 0x10]
mov eax, dword [edi + 0xb8]
imul esi, esi, 0x58
mov edx, dword [edi + 0x11ac]
lea ebp, [esi + eax + 0x20]
mov eax, edx
lea ecx, [eax + 1]
mov bl, byte [eax]
inc eax
test bl, bl
jne 0x41cb42
sub eax, ecx
push eax
push edx
mov ecx, ebp
call fcn.00401b10
mov edi, dword [edi + 0xb8]
mov byte [esi + edi], 1
jmp 0x41cb72
mov eax, dword [esp + 0x10]
mov edi, dword [edi + 0xb8]
imul eax, eax, 0x58
add eax, edi
mov byte [eax], 0
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 4]
xor ebx, ebx
cmp eax, ebx
je 0x41cba1
mov ecx, dword [ecx + 8]
sub ecx, eax
mov eax, 0x2e8ba2e9
imul ecx
mov ecx, dword [esp + 0x10]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jb 0x41ccfa
mov eax, 0xf
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], 0
mov dword [esp + 0x8c], eax
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], 0
mov dword [esp + 0xa8], eax
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], 0
mov byte [esp + 0xd4], 5
mov edx, dword [esp + 0x1c]
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41cbf0
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x60]
call fcn.00401b10
mov edi, dword [esp + 0xdc]
mov eax, dword [edi + 0x11b0]
mov esi, dword [esp + 0x24]
cmp eax, ebx
setne cl
mov eax, esi
mov byte [esp + 0x54], cl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41cc23
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x98]
call fcn.00401b10
mov al, byte [esp + 0x54]
test al, al
je 0x41cc64
mov edx, dword [edi + 0x11ac]
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41cc50
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x7c]
call fcn.00401b10
mov eax, dword [esp + 0x20]
lea ebx, [esp + 0x54]
call fcn.00420920
mov eax, dword [esp + 0xa8]
mov edi, 0x10
cmp eax, edi
jb 0x41cc91
mov edx, dword [esp + 0x94]
push edx
call fcn.004fa776
add esp, 4
mov eax, dword [esp + 0x8c]
xor ebx, ebx
cmp eax, edi
mov esi, 0xf
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
jb 0x41ccc5
mov eax, dword [esp + 0x78]
push eax
call fcn.004fa776
add esp, 4
cmp dword [esp + 0x70], edi
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
jb 0x41ccea
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.004fa776
add esp, 4
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
mov dword [esp + 0x70], esi
xor ebx, ebx
jmp 0x41ccff
mov edi, 0x10
mov byte [esp + 0xd4], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
pop esi
jg 0x41cd26
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x40]
mov byte [esp + 0xd0], 1
call fcn.004fd886
cmp dword [esp + 0xc0], edi
jb 0x41cd50
mov eax, dword [esp + 0xac]
push eax
call fcn.004fa776
add esp, 4
mov dword [esp + 0xbc], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0xc0], 0xf
mov byte [esp + 0xac], 0
lea eax, [ebx - 0x10]
mov dword [esp + 0xd0], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop edi
pop ebp
pop ebx
jg 0x41cd96
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0xbc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0xb8]
call fcn.004b6cac
add esp, 0xc8
ret 4