Function at 0x668820
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x766480]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 8]
mov dword [esi + 0x88], eax
mov dword [esi + 0x10], 0
cmp eax, 1
jne 0x66897e
test edi, edi
jne 0x668870
pop edi
pop esi
mov eax, 0x80070057
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006dfb52
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [esi]
test eax, eax
je 0x668885
push eax
call fcn.006dfeff
add esp, 4
mov dword [esi], 0
push 0x10000
push 0
push edi
call dword [sym.imp.WINMM.dll_mmioOpenA]
mov dword [esi + 4], eax
test eax, eax
jne 0x668947
push str.WAVE
push edi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
jne 0x6688c8
push 0x713638
push edi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x6689fe
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x64], eax
test eax, eax
je 0x6689fe
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x6689fe
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x6689fe
push edi
call fcn.006dff04
push edi
push ebx
push eax
mov dword [esi + 8], eax
call sub.VCRUNTIME140.dll_memcpy
push 0x48
lea eax, [ebp - 0x60]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esi + 8]
add esp, 0x1c
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x60]
mov dword [ebp - 0x5c], 0x204d454d
mov dword [ebp - 0x4c], edi
push 0x10000
push eax
push 0
call dword [sym.imp.WINMM.dll_mmioOpenA]
mov dword [esi + 4], eax
mov ecx, esi
call fcn.00668c40
test eax, eax
js 0x6689f3
mov ecx, esi
call fcn.00668db0
test eax, eax
js 0x6689fe
mov ecx, dword [esi + 0x19]
pop edi
mov dword [esi + 0xc], ecx
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006dfb52
mov esp, ebp
pop ebp
ret 0xc
push 0x11002
push 0
push edi
call dword [sym.imp.WINMM.dll_mmioOpenA]
mov ecx, eax
mov dword [esi + 4], ecx
test ecx, ecx
je 0x6689fe
push 0x20
lea eax, [esi + 0x29]
mov dword [ebp - 0x64], 0xffffffff
push eax
push ecx
mov dword [esi + 0x31], 0x45564157
mov dword [esi + 0x2d], 0
call dword [sym.imp.WINMM.dll_mmioCreateChunk]
test eax, eax
jne 0x6689f3
push eax
lea edi, [esi + 0x15]
mov dword [esi + 0x19], 0x10
mov dword [edi], 0x20746d66
push edi
push dword [esi + 4]
call dword [sym.imp.WINMM.dll_mmioCreateChunk]
test eax, eax
jne 0x6689f3
cmp word [ebx], 1
jne 0x668a16
push 0x10
push ebx
push dword [esi + 4]
mov ebx, dword [sym.imp.WINMM.dll_mmioWrite]
call ebx
cmp eax, 0x10
je 0x668a39
push 0
push dword [esi + 4]
call dword [sym.imp.WINMM.dll_mmioClose]
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006dfb52
mov esp, ebp
pop ebp
ret 0xc
movzx eax, word [ebx + 0x10]
add eax, 0x12
push eax
push ebx
push dword [esi + 4]
call dword [sym.imp.WINMM.dll_mmioWrite]
movzx ecx, word [ebx + 0x10]
add ecx, 0x12
cmp eax, ecx
jne 0x6689f3
mov ebx, dword [sym.imp.WINMM.dll_mmioWrite]
push 0
push edi
push dword [esi + 4]
mov edi, dword [sym.imp.WINMM.dll_mmioAscend]
call edi
test eax, eax
jne 0x6689f3
push eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
push dword [esi + 4]
mov dword [ebp - 0x18], 0x74636166
call dword [sym.imp.WINMM.dll_mmioCreateChunk]
test eax, eax
jne 0x6689f3
push 4
lea eax, [ebp - 0x64]
push eax
push dword [esi + 4]
call ebx
cmp eax, 4
jne 0x6689f3
push 0
lea eax, [ebp - 0x18]
push eax
push dword [esi + 4]
call edi
test eax, eax
jne 0x6689f3
mov ecx, esi
call fcn.00668db0
test eax, eax
js 0x6689fe
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006dfb52
mov esp, ebp
pop ebp
ret 0xc