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

Disassembly:
sub esp, 0x280
mov eax, dword [0x484004]
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 0x415087
jl 0x415075
cmp ebp, edx
jae 0x415087
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
jmp 0x4150a3
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 0x4150af
cmp eax, ecx
je 0x415691
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.0043e850
add esp, 0xc
push 4
lea ecx, [esp + 0x58]
push str.RIFF
push ecx
call fcn.0043b730
add esp, 0xc
push 4
lea edx, [esp + 0x60]
push str.WAVE
push edx
call fcn.0043b730
add esp, 0xc
push 4
lea eax, [esp + 0x64]
push str.fmt
push eax
call fcn.0043b730
add esp, 0xc
push 4
lea ecx, [esp + 0x7c]
push str.data
push ecx
call fcn.0043b730
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 0x415162
mov edi, eax
lea esi, [ebx + 0x10971f8]
cmp dword [esi], 0
je 0x415157
add cx, 1
mov word [esp + 0x6a], cx
add edx, 1
add esi, 4
cmp edx, dword [edi + 0x2c]
jl 0x415149
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 0x477f94
fldcw word [esp + 0x10]
imul eax, esi
imul ecx, edi
shl eax, 4
shr eax, 3
mov dword [esp + 0x70], edi
mov edi, dword [0x488ae8]
mov dword [esp + 0x80], eax
add eax, 0x24
shr ecx, 3
push 0x477f88
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.0043bf85
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.0043c301
mov eax, dword [edi]
add esp, 0x14
push eax
call fcn.0043c6cc
mov edi, dword [0x488ae8]
mov esi, dword [esp + 0x70]
add esp, 4
push 0x477f94
push 0x477f88
push edi
call fcn.0043bf85
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.0043c301
mov edx, dword [edi]
add esp, 0x14
push edx
call fcn.0043c6cc
mov edi, dword [0x488ae8]
movzx esi, word [esp + 0x7a]
add esp, 4
push 0x477f94
push 0x477f88
push edi
call fcn.0043bf85
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.0043c301
mov ecx, dword [edi]
add esp, 0x14
push ecx
call fcn.0043c6cc
mov edi, dword [0x488ae8]
movzx esi, word [esp + 0x78]
add esp, 4
push 0x477f94
push 0x477f88
push edi
call fcn.0043bf85
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.0043c301
mov eax, dword [edi]
add esp, 0x14
push eax
call fcn.0043c6cc
mov edi, dword [0x488ae8]
mov esi, dword [esp + 0x5c]
add esp, 4
push 0x477f94
push 0x477f88
push edi
call fcn.0043bf85
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.0043c301
mov edx, dword [edi]
add esp, 0x14
push edx
call fcn.0043c6cc
mov edi, dword [0x488ae8]
mov esi, dword [esp + 0x68]
add esp, 4
push 0x477f94
push 0x477f88
push edi
call fcn.0043bf85
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.0043c301
mov ecx, dword [edi]
add esp, 0x14
push ecx
call fcn.0043c6cc
mov edi, dword [0x488ae8]
mov esi, dword [esp + 0x80]
add esp, 4
push 0x477f94
push 0x477f88
push edi
call fcn.0043bf85
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.0043c301
mov eax, dword [edi]
add esp, 0x14
push eax
call fcn.0043c6cc
mov edi, dword [0x488ae8]
movzx esi, word [esp + 0x6c]
add esp, 4
push 0x477f94
push 0x477f88
push edi
call fcn.0043bf85
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.0043c301
mov edx, dword [edi]
add esp, 0x14
push edx
call fcn.0043c6cc
mov edi, dword [0x488ae8]
mov esi, dword [esp + 0x74]
add esp, 4
push 0x477f94
push 0x477f88
push edi
call fcn.0043bf85
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.0043c301
mov ecx, dword [edi]
add esp, 0x14
push ecx
call fcn.0043c6cc
mov edx, dword [0x489b08]
mov eax, dword [0x488a6c]
add esp, 4
push 0x100
shl edx, 9
add edx, 0x488b08
push edx
push 0xd4
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
mov eax, dword [0x489b08]
lea ecx, [eax + 1]
and ecx, reloc.OLEAUT32.dll_VariantInit
jns 0x41545a
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, 0x488b08
push eax
push 2
push 0x400
push edx
mov dword [0x489b08], ecx
call edi
push str..wav
lea esi, [ebx + 0x10969f8]
push esi
call fcn.0043d6ad
add esp, 8
test eax, eax
je 0x41566b
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 0x415675
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 0x41565c
jl 0x41550e
cmp ebp, dword [esp + 0x18]
jae 0x41565c
jmp 0x41550e
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 [0x479598]
call fcn.00441de0
mov ebp, eax
cmp ebp, dword [esp + 0x34]
je 0x415550
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.0043e850
mov edx, dword [ebx + 0x10cc078]
xor edi, edi
add esp, 0xc
xor ebp, ebp
cmp dword [edx + 0x2c], edi
jle 0x415612
lea eax, [ebx + 0x10971f8]
mov dword [esp + 0x30], edi
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0xc]
cmp dword [ecx], 0
je 0x4155f6
mov ecx, dword [ebx + 0x10cc078]
movsx eax, byte [ecx + 0x498]
sub eax, 1
je 0x4155c0
sub eax, 5
jne 0x4155f6
mov edx, dword [esp + 0x10]
push ebp
push esi
push edx
mov esi, ecx
call fcn.00402d50
mov esi, dword [esp + 0x14]
add ax, 0x8000
jmp 0x4155eb
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.00402de0
fmul qword [0x479670]
fdiv dword [esp + 0x40]
call fcn.00441de0
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 0x415588
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 0x415500
jg 0x415656
mov edx, dword [esp + 0x10]
cmp edx, dword [esp + 0x18]
jb 0x415500
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x41566b
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.0043b563
add esp, 0x280
ret