Function at 0x415090
Capabilities:
Delete file
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x280
mov eax, dword [0x487004]
xor eax, esp
mov dword [esp + 0x278], eax
mov eax, dword [ebx + 0x10cc07c]
mov ecx, dword [ebx + 0x10cc080]
mov edx, dword [ecx + 0xe0]
mov ecx, dword [ecx + 0xe4]
push ebp
mov ebp, dword [eax + 0xe0]
mov eax, dword [eax + 0xe4]
cmp eax, ecx
push esi
push edi
jg 0x4150e7
jl 0x4150d5
cmp ebp, edx
jae 0x4150e7
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
jmp 0x415103
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], edx
mov dword [esp + 0x1c], eax
mov ebp, edx
mov edx, dword [esp + 0x18]
mov ecx, eax
mov eax, dword [esp + 0x2c]
cmp ebp, edx
jne 0x41510f
cmp eax, ecx
je 0x4156f1
sub edx, ebp
sbb ecx, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
fild qword [esp + 0x10]
push 0x2c
lea eax, [esp + 0x58]
push 0
push eax
fstp qword [esp + 0x54]
mov dword [esp + 0x40], 0
call fcn.0043f810
add esp, 0xc
push 4
lea ecx, [esp + 0x58]
push str.RIFF
push ecx
call fcn.0043c670
add esp, 0xc
push 4
lea edx, [esp + 0x60]
push str.WAVE
push edx
call fcn.0043c670
add esp, 0xc
push 4
lea eax, [esp + 0x64]
push str.fmt
push eax
call fcn.0043c670
add esp, 0xc
push 4
lea ecx, [esp + 0x7c]
push str.data
push ecx
call fcn.0043c670
mov eax, dword [ebx + 0x10cc078]
xor cx, cx
xor edx, edx
add esp, 0xc
mov word [esp + 0x6a], cx
cmp dword [eax + 0x2c], edx
jle 0x4151c2
mov edi, eax
lea esi, [ebx + 0x10971f8]
cmp dword [esi], 0
je 0x4151b7
add cx, 1
mov word [esp + 0x6a], cx
add edx, 1
add esi, 4
cmp edx, dword [edi + 0x2c]
jl 0x4151a9
fld dword [eax + 0x4ff0]
movzx esi, cx
fnstcw word [esp + 0xc]
movzx eax, word [esp + 0xc]
or eax, 0xc00
mov dword [esp + 0x24], eax
mov ecx, esi
shl ecx, 4
fldcw word [esp + 0x24]
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
fistp qword [esp + 0x38]
mov edi, dword [esp + 0x38]
mov word [esp + 0x74], ax
mov eax, dword [esp + 0x18]
sub eax, ebp
push 0x47a14c
fldcw word [esp + 0x10]
imul eax, esi
imul ecx, edi
shl eax, 4
shr eax, 3
mov dword [esp + 0x70], edi
mov edi, dword [0x48bae8]
mov dword [esp + 0x80], eax
add eax, 0x24
shr ecx, 3
push 0x47a140
push edi
mov word [esp + 0x82], 0x10
mov dword [esp + 0x64], eax
mov dword [esp + 0x70], 0x10
mov word [esp + 0x74], 1
mov dword [esp + 0x7c], ecx
call fcn.0043cec5
mov edx, dword [edi]
add esp, 0xc
push esi
push esi
push str._int__wavh.numChannels
push str._s_d__x__n
push edx
call fcn.0043d241
mov eax, dword [edi]
add esp, 0x14
push eax
call fcn.0043d60c
mov edi, dword [0x48bae8]
mov esi, dword [esp + 0x70]
add esp, 4
push 0x47a14c
push 0x47a140
push edi
call fcn.0043cec5
mov ecx, dword [edi]
add esp, 0xc
push esi
push esi
push str._int__wavh.sampleRate
push str._s_d__x__n
push ecx
call fcn.0043d241
mov edx, dword [edi]
add esp, 0x14
push edx
call fcn.0043d60c
mov edi, dword [0x48bae8]
movzx esi, word [esp + 0x7a]
add esp, 4
push 0x47a14c
push 0x47a140
push edi
call fcn.0043cec5
add esp, 0xc
push esi
push esi
push str._int__wavh.bitsPerSample
push str._s_d__x__n
mov eax, dword [edi]
push eax
call fcn.0043d241
mov ecx, dword [edi]
add esp, 0x14
push ecx
call fcn.0043d60c
mov edi, dword [0x48bae8]
movzx esi, word [esp + 0x78]
add esp, 4
push 0x47a14c
push 0x47a140
push edi
call fcn.0043cec5
mov edx, dword [edi]
add esp, 0xc
push esi
push esi
push str._int__wavh.blockAlign
push str._s_d__x__n
push edx
call fcn.0043d241
mov eax, dword [edi]
add esp, 0x14
push eax
call fcn.0043d60c
mov edi, dword [0x48bae8]
mov esi, dword [esp + 0x5c]
add esp, 4
push 0x47a14c
push 0x47a140
push edi
call fcn.0043cec5
mov ecx, dword [edi]
add esp, 0xc
push esi
push esi
push str._int__wavh.chunkSize
push str._s_d__x__n
push ecx
call fcn.0043d241
mov edx, dword [edi]
add esp, 0x14
push edx
call fcn.0043d60c
mov edi, dword [0x48bae8]
mov esi, dword [esp + 0x68]
add esp, 4
push 0x47a14c
push 0x47a140
push edi
call fcn.0043cec5
mov eax, dword [edi]
add esp, 0xc
push esi
push esi
push str._int__wavh.subchunk1Size
push str._s_d__x__n
push eax
call fcn.0043d241
mov ecx, dword [edi]
add esp, 0x14
push ecx
call fcn.0043d60c
mov edi, dword [0x48bae8]
mov esi, dword [esp + 0x80]
add esp, 4
push 0x47a14c
push 0x47a140
push edi
call fcn.0043cec5
mov edx, dword [edi]
add esp, 0xc
push esi
push esi
push str._int__wavh.subchunk2Size
push str._s_d__x__n
push edx
call fcn.0043d241
mov eax, dword [edi]
add esp, 0x14
push eax
call fcn.0043d60c
mov edi, dword [0x48bae8]
movzx esi, word [esp + 0x6c]
add esp, 4
push 0x47a14c
push 0x47a140
push edi
call fcn.0043cec5
mov ecx, dword [edi]
add esp, 0xc
push esi
push esi
push str._int__wavh.audioFormat
push str._s_d__x__n
push ecx
call fcn.0043d241
mov edx, dword [edi]
add esp, 0x14
push edx
call fcn.0043d60c
mov edi, dword [0x48bae8]
mov esi, dword [esp + 0x74]
add esp, 4
push 0x47a14c
push 0x47a140
push edi
call fcn.0043cec5
mov eax, dword [edi]
add esp, 0xc
push esi
push esi
push str._int__wavh.byteRate
push str._s_d__x__n
push eax
call fcn.0043d241
mov ecx, dword [edi]
add esp, 0x14
push ecx
call fcn.0043d60c
mov edx, dword [0x48cb08]
mov eax, dword [0x48ba6c]
add esp, 4
push 0x100
shl edx, 9
add edx, 0x48bb08
push edx
push 0xd4
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
mov eax, dword [0x48cb08]
lea ecx, [eax + 1]
and ecx, reloc.OLEAUT32.dll_VariantInit
jns 0x4154ba
dec ecx
or ecx, 0xfffffff8
inc ecx
mov edx, dword [ebx + 0x1097a10]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
shl eax, 9
add eax, 0x48bb08
push eax
push 2
push 0x400
push edx
mov dword [0x48cb08], ecx
call edi
push str..wav
lea esi, [ebx + 0x10969f8]
push esi
call fcn.0043e5ed
add esp, 8
test eax, eax
je 0x4156cb
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x20
push 1
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
je 0x4156d5
push 0
lea ecx, [esp + 0x48]
push ecx
push 0x2c
lea edx, [esp + 0x60]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x1c]
mov esi, eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], esi
jg 0x4156bc
jl 0x41556e
cmp ebp, dword [esp + 0x18]
jae 0x4156bc
jmp 0x41556e
mov ebp, dword [esp + 0x28]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
sub ecx, ebp
mov edx, esi
sbb edx, eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
fild qword [esp + 0x38]
fdiv qword [esp + 0x48]
fmul qword [0x47b738]
call fcn.00442da0
mov ebp, eax
cmp ebp, dword [esp + 0x34]
je 0x4155b0
mov eax, dword [ebx + 0x1097a10]
push ebp
push 1
push 0x400
push eax
call edi
mov dword [esp + 0x34], ebp
push 0x200
lea ecx, [esp + 0x84]
push 0
push ecx
call fcn.0043f810
mov edx, dword [ebx + 0x10cc078]
xor edi, edi
add esp, 0xc
xor ebp, ebp
cmp dword [edx + 0x2c], edi
jle 0x415672
lea eax, [ebx + 0x10971f8]
mov dword [esp + 0x30], edi
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0xc]
cmp dword [ecx], 0
je 0x415656
mov ecx, dword [ebx + 0x10cc078]
movsx eax, byte [ecx + 0x498]
sub eax, 1
je 0x415620
sub eax, 5
jne 0x415656
mov edx, dword [esp + 0x10]
push ebp
push esi
push edx
mov esi, ecx
call fcn.00402d60
mov esi, dword [esp + 0x14]
add ax, 0x8000
jmp 0x41564b
mov eax, dword [esp + 0x30]
fld qword [eax + ecx + 0x4fc]
mov edx, dword [esp + 0x10]
push esi
fstp dword [esp + 0x44]
push edx
mov eax, ebp
call fcn.00402df0
fmul qword [0x47b810]
fdiv dword [esp + 0x40]
call fcn.00442da0
mov word [esp + edi*2 + 0x80], ax
add edi, 1
mov eax, dword [ebx + 0x10cc078]
add dword [esp + 0xc], 4
add dword [esp + 0x30], 0x14
add ebp, 1
cmp ebp, dword [eax + 0x2c]
jl 0x4155e8
push 0
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x2c]
lea edx, [edi + edi]
push edx
lea eax, [esp + 0x8c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [esp + 0x10], 1
adc esi, 0
cmp esi, dword [esp + 0x1c]
mov dword [esp + 0x14], esi
jl 0x415560
jg 0x4156b6
mov edx, dword [esp + 0x10]
cmp edx, dword [esp + 0x18]
jb 0x415560
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4156cb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x1097a30], 1
mov eax, dword [ebx + 0x1097a10]
push 0x64
push 1
push 0x400
push eax
call edi
mov dword [ebx + 0x1097a10], 0
mov ecx, dword [esp + 0x284]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0043c4a7
add esp, 0x280
ret