Function at 0x4100a0
Capabilities:
Extract resource via kernel32 functions
Get common file path
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45d7d6
mov eax, dword fs:[0]
push eax
sub esp, 0x838
mov eax, dword [0x488250]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x828]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x840], eax
xor eax, eax
push eax
push 0x463180
mov dword [ebp - 0x844], 0
mov dword [ebp - 0x814], 7
mov dword [ebp - 0x818], 0
mov word [ebp - 0x828], ax
call fcn.00405750
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
movzx eax, word [ebp + 0xc]
push str.SOUND
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
jne 0x41016b
mov dword [edi + 0x10], eax
mov ecx, edi
mov dword [edi + 0x14], 7
mov word [edi], ax
lea eax, [ebp - 0x828]
push eax
call fcn.004066e0
mov ecx, dword [ebp - 0x814]
cmp ecx, 8
jb 0x410321
inc ecx
push ecx
jmp 0x410310
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x83c], eax
test eax, eax
je 0x4102f7
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, dword [ebp - 0x83c]
lea ecx, [ebp - 0x838]
xorps xmm0, xmm0
mov dword [ebp - 0x830], 0
movq qword [ebp - 0x838], xmm0
mov esi, eax
push ebx
mov dword [ebp - 0x838], 0
mov dword [ebp - 0x834], 0
mov dword [ebp - 0x830], 0
call fcn.004045e0
push ebx
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, dword [ebp - 0x838]
push eax
push esi
call fcn.0043abd0
add esp, 0xc
lea eax, [ebp - 0x810]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp word [ebp - 0x810], 0
jne 0x41020c
xor ecx, ecx
jmp 0x410224
lea ecx, [ebp - 0x810]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410215
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x810]
push eax
lea ecx, [ebp - 0x828]
call fcn.00405750
push 0xffffffffffffffff
push 0
push dword [ebp - 0x840]
lea ecx, [ebp - 0x828]
call fcn.0040bd10
cmp dword [ebp - 0x814], 8
lea eax, [ebp - 0x828]
push 0x463190
cmovae eax, dword [ebp - 0x828]
push eax
lea eax, [ebp - 0x82c]
push eax
call fcn.00445c0f
add esp, 0xc
cmp dword [ebp - 0x82c], 0
je 0x4102e6
push str.xxxx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [ebp - 0x82c]
push dword [ebp - 0x834]
push 1
push esi
call fcn.004470a1
push dword [ebp - 0x82c]
call fcn.00445ccc
xor eax, eax
mov dword [edi + 0x14], 7
add esp, 0x14
mov dword [edi + 0x10], 0
mov word [edi], ax
mov ecx, edi
lea eax, [ebp - 0x828]
push eax
call fcn.004066e0
test esi, esi
je 0x4102d9
push esi
call fcn.00438227
add esp, 4
lea ecx, [ebp - 0x828]
call fcn.0040f7b0
jmp 0x410321
mov byte [ebp - 4], 0
test esi, esi
je 0x4102f7
push esi
call fcn.00438227
add esp, 4
push 0x4631a0
mov ecx, edi
call fcn.0040a020
mov eax, dword [ebp - 0x814]
cmp eax, 8
jb 0x410321
inc eax
push eax
push dword [ebp - 0x828]
lea ecx, [ebp - 0x828]
call fcn.00405850
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004380af
mov esp, ebp
pop ebp
ret