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

Disassembly:
sub esp, 0xe4
mov eax, dword [0x95f26c]
push ebx
push ebp
mov ebp, dword [esp + 0xf4]
push esi
mov esi, dword [esp + 0x108]
xor ebx, ebx
and esi, 2
xor ecx, ecx
cmp eax, ebx
push edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
jle 0x41b5ba
lea eax, [ebp + 0x44]
mov dword [eax - 0x40], ebx
mov dword [eax], ebx
mov edx, dword [0x95f26c]
inc ecx
add eax, 4
cmp ecx, edx
jl 0x41b5a7
mov edx, dword [esp + 0x104]
lea eax, [esp + 0x68]
lea ecx, [esp + 0xa0]
push eax
mov eax, dword [esp + 0x104]
push ecx
push edx
push eax
call fcn.0041bd80
mov edi, eax
add esp, 0x10
cmp edi, ebx
mov dword [esp + 0x48], edi
jne 0x41b5f6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
lea ecx, [esp + 0x54]
push 0x12
push ecx
push edi
call dword [sym.imp.WINMM.dll_mmioRead]
cmp eax, 0x12
jae 0x41b61e
push ebx
push edi
call dword [sym.imp.WINMM.dll_mmioClose]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
cmp word [esp + 0x54], 1
push ebx
je 0x41b63b
push edi
call dword [sym.imp.WINMM.dll_mmioClose]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
lea edx, [esp + 0x6c]
push edx
push edi
call dword [sym.imp.WINMM.dll_mmioAscend]
test eax, eax
je 0x41b660
push ebx
push edi
call dword [sym.imp.WINMM.dll_mmioClose]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
lea eax, [esp + 0xa0]
push 0x10
lea ecx, [esp + 0x6c]
push eax
push ecx
push edi
mov dword [esp + 0x78], 0x61746164
call dword [sym.imp.WINMM.dll_mmioDescend]
test eax, eax
je 0x41b697
push ebx
push edi
call dword [sym.imp.WINMM.dll_mmioClose]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
cmp esi, ebx
mov esi, dword [sym.imp.WINMM.dll_mmioSeek]
je 0x41b6b3
push 1
push 0
push edi
mov ebx, 0x100000
call esi
mov dword [esp + 0x50], eax
jmp 0x41b6b7
mov ebx, dword [esp + 0x6c]
push ebx
call fcn.0043b33e
add esp, 4
mov dword [esp + 0x1c], eax
push 1
push 0
push edi
call esi
mov edx, dword [esp + 0x1c]
push ebx
push edx
push edi
mov esi, eax
call dword [sym.imp.WINMM.dll_mmioRead]
xor eax, eax
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x34], eax
mov dx, word [esp + 0x56]
mov dword [esp + 0x38], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], eax
mov edi, 1
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x60]
mov word [esp + 0x40], ax
and eax, 0xffff
imul eax, ecx
mov cx, word [esp + 0x62]
mov dword [esp + 0x3c], eax
mov word [esp + 0x42], cx
mov ecx, dword [esp + 0x30]
xor eax, eax
mov dword [ebp + 0x184], ebx
cmp ecx, eax
mov word [esp + 0x34], di
mov word [esp + 0x36], dx
mov dword [esp + 0x14], 0x1a2
jne 0x41b7cc
test byte [esp + 0x10c], 1
jne 0x41b75a
cmp dx, di
jne 0x41b75a
mov dword [esp + 0x14], 0x1b2
mov dword [ebp + 0x1ac], eax
mov dword [ebp + 0x1b4], eax
mov dword [ebp + 0x1b8], eax
mov esi, dword [esp + 0x14]
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x7c]
lea edx, [esp + 0x34]
push 0
rep stosd dword es:[edi], eax
mov eax, dword [0x4ac414]
mov dword [esp + 0x90], edx
lea edx, [esp + 0x14]
mov dword [esp + 0x80], 0x24
push edx
lea edx, [esp + 0x84]
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], ebx
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
jge 0x41b83d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
push eax
push eax
mov dword [ebp + 0x1ac], edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push eax
push eax
mov dword [ebp + 0x1cc], eax
mov dword [ebp + 0x1c4], eax
mov dword [ebp + 0x1b0], esi
call edi
push 0
push 0
mov esi, eax
push 0
push 0
mov dword [ebp + 0x1b4], esi
call edi
push 0
push 0
push 0
push 0
mov dword [ebp + 0x1b8], eax
call edi
mov dword [ebp + 0x1c0], eax
lea ecx, [esp + 0xb8]
mov eax, 0x1ffff
mov dword [ecx - 4], eax
mov dword [ecx], esi
add eax, 0x20000
add ecx, 8
cmp eax, 0x11ffff
jl 0x41b824
jmp 0x41b76c
mov ecx, dword [esp + 0x10]
lea eax, [ebp + 4]
push eax
push 0x449370
mov edx, dword [ecx]
push ecx
call dword [edx]
test eax, eax
je 0x41b860
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
mov eax, dword [esp + 0x10]
mov ecx, esi
and ecx, 0x10
mov dword [ebp], eax
mov dword [esp + 0x44], ecx
je 0x41b891
mov ecx, dword [eax]
lea edx, [ebp + 0x44]
push edx
push 0x449350
push eax
call dword [ecx]
test eax, eax
je 0x41b89a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
mov dword [ebp + 0x44], 0
jmp 0x41b89e
mov eax, dword [esp + 0x10]
mov ecx, dword [0x95f26c]
cmp ecx, 1
jle 0x41b940
mov edx, dword [ebp + 0x1a4]
test edx, edx
jne 0x41b940
cmp ecx, 1
mov dword [esp + 0x14], 1
jle 0x41b940
lea esi, [ebp + 0x48]
mov ecx, dword [0x4ac414]
lea edi, [esp + 0x24]
push edi
push eax
mov edx, dword [ecx]
push ecx
call dword [edx + 0x14]
test eax, eax
jl 0x41ba77
mov eax, dword [esp + 0x24]
lea edx, [esi - 0x40]
push edx
push 0x449370
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jne 0x41ba77
mov eax, dword [esp + 0x44]
test eax, eax
je 0x41b920
mov eax, dword [esp + 0x24]
push esi
push 0x449350
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
jne 0x41ba77
jmp 0x41b926
mov dword [esi], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [0x95f26c]
inc eax
add esi, 4
mov dword [esp + 0x14], eax
cmp eax, ecx
mov eax, dword [esp + 0x10]
jl 0x41b8cb
mov edi, dword [esp + 0x30]
test edi, edi
je 0x41b9b0
mov eax, dword [ebp + 4]
lea ecx, [esp + 0x28]
push ecx
push 0x449340
mov edx, dword [eax]
push eax
call dword [edx]
test eax, eax
je 0x41b96b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0xb4]
push ecx
push 8
mov edx, dword [eax]
push eax
call dword [edx + 0xc]
mov esi, eax
mov eax, dword [esp + 0x28]
push eax
mov edx, dword [eax]
call dword [edx + 8]
test esi, esi
je 0x41b9ac
lea eax, [esp + 0xb4]
push eax
call fcn.0043b478
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x4c]
push 1
push edx
lea edx, [esp + 0x34]
mov ecx, dword [eax]
push edx
lea edx, [esp + 0x2c]
push edx
lea edx, [esp + 0x28]
push edx
push ebx
push 0
push eax
call dword [ecx + 0x2c]
test eax, eax
je 0x41b9e0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
mov ecx, dword [esp + 0x20]
test edi, edi
je 0x41ba35
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
sub ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x20]
mov ecx, dword [ebp + 0x1c8]
mov edi, dword [esp + 0x18]
sub edx, eax
push ecx
push eax
add edx, edi
push 1
push edx
call fcn.004140e0
push ebp
mov dword [ebp + 0x198], 1
call fcn.0041b530
add esp, 0x14
jmp 0x41ba55
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 0x1bc], 0xffffffff
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x30]
mov ecx, dword [eax]
push edx
mov edx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x24]
push edx
push eax
call dword [ecx + 0x4c]
test eax, eax
je 0x41ba84
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
mov eax, dword [esp + 0x48]
push 0
push eax
call dword [sym.imp.WINMM.dll_mmioClose]
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0043b478
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret