Function at 0x412dd0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x48
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
cmp eax, 1
push edi
mov dword [esi + 0x148], eax
mov dword [esi + 0x14c], ebx
jne 0x412f5d
mov ebp, dword [esp + 0x60]
cmp ebp, ebx
jne 0x412e0b
pop edi
pop esi
pop ebp
mov eax, 0x80070057
pop ebx
add esp, 0x48
ret 0xc
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x412e1e
push eax
call fcn.004a2ce2
add esp, 4
mov dword [esi + 4], ebx
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x412e31
push eax
call fcn.004a2ce2
add esp, 4
mov dword [esi + 8], ebx
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x412e44
push eax
call fcn.004a2ce2
add esp, 4
mov dword [esi + 0xc], ebx
push 0x10000
push ebx
push ebp
call dword [sym.imp.WINMM.dll_mmioOpenA]
cmp eax, ebx
mov dword [esi + 0x10], eax
jne 0x412f24
mov ebx, dword [esp + 0x5c]
push str.WAVE
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_FindResourceA]
push ebx
call ebp
mov edi, eax
test edi, edi
jne 0x412e97
mov eax, dword [esp + 0x60]
push 0x4ca668
push eax
push ebx
call ebp
mov edi, eax
test edi, edi
jne 0x412e97
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x48
ret 0xc
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebp, eax
test ebp, ebp
jne 0x412eb4
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x48
ret 0xc
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
jne 0x412ed1
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x48
ret 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, eax
test edx, edx
jne 0x412eed
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x48
ret 0xc
mov ecx, 0x12
xor eax, eax
lea edi, [esp + 0x10]
push 0x10000
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], 0x204d454d
push ecx
push eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], edx
call dword [sym.imp.WINMM.dll_mmioOpenA]
mov ebp, dword [esp + 0x60]
mov dword [esi + 0x10], eax
xor ebx, ebx
mov ecx, esi
call fcn.00413090
mov edi, eax
push ebx
cmp edi, ebx
jge 0x412f48
mov edx, dword [esi + 0x10]
push edx
call dword [sym.imp.WINMM.dll_mmioClose]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret 0xc
mov ecx, esi
call fcn.004132d0
mov edi, eax
cmp edi, ebx
jl 0x412fcb
mov eax, dword [esi + 0x18]
mov dword [esi + 0x3c], eax
jmp 0x412fc0
mov ebp, dword [esp + 0x60]
push 0x11002
push ebx
push ebp
call dword [sym.imp.WINMM.dll_mmioOpenA]
cmp eax, ebx
mov dword [esi + 0x10], eax
jne 0x412f84
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x48
ret 0xc
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push ecx
push edx
mov ecx, esi
call fcn.004135d0
mov edi, eax
push ebx
cmp edi, ebx
jge 0x412fb0
mov eax, dword [esi + 0x10]
push eax
call dword [sym.imp.WINMM.dll_mmioClose]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret 0xc
mov ecx, esi
call fcn.004132d0
mov edi, eax
cmp edi, ebx
jl 0x412fcb
mov dword [esi + 0x3c], ebx
add esi, 0x44
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret 0xc