Function at 0x1004b640
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x454
mov eax, dword [0x105520d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov ebx, ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x418], eax
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
push 0x102aa468
mov dword [ebp - 0x3fc], ecx
mov dword [ecx], 0
mov ecx, dword [ebx + 0x3010]
push 2
push ecx
mov dword [ebp - 0x438], eax
call fcn.10115e20
mov ecx, dword [ebx + 0x3008]
add esp, 0xc
push 0x1003
push 0x1558
call fcn.100a6fc0
test al, al
je 0x1004b6dd
mov ecx, dword [ebx + 0x3008]
call fcn.10075d40
test al, al
mov eax, str.PASS
jne 0x1004b6c6
mov eax, str.FAIL
mov edx, dword [ebx + 0x3010]
push eax
push str.____DIAG_ClearPhoneLogQueue___s
push 4
push edx
call fcn.10115e20
add esp, 0x10
mov esi, dword [sym.imp.MSVCR100.dll__time64]
lea eax, [ebp - 0x428]
push eax
call esi
add esp, 4
nop
lea ecx, [ebp - 0x430]
push ecx
call esi
mov edx, dword [ebp - 0x424]
mov eax, dword [ebp - 0x428]
mov ecx, dword [ebp - 0x42c]
push edx
mov edx, dword [ebp - 0x430]
push eax
push ecx
push edx
call dword [sym.imp.MSVCR100.dll__difftime64]
fstp qword [ebp - 0x3f8]
mov ecx, dword [ebx + 0x300c]
add esp, 0x14
call fcn.1013d460
fld qword [0x102aa460]
fcomp qword [ebp - 0x3f8]
mov ecx, eax
fnstsw ax
test ah, 5
jp 0x1004b74c
test ecx, ecx
je 0x1004b7fd
cmp ecx, 1
jb 0x1004b6f0
fild dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
push edi
lea ecx, [ebp - 0x428]
fdiv qword [0x1021fae8]
lea edi, [eax + eax*2]
push ecx
shl edi, 6
fmul qword [0x102aa458]
fadd qword [0x1021cda8]
fstp qword [ebp - 0x3f8]
call esi
add esp, 4
mov ecx, dword [ebx + 0x300c]
call fcn.1013d470
lea edx, [ebp - 0x430]
push edx
mov esi, eax
call dword [sym.imp.MSVCR100.dll__time64]
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x428]
mov edx, dword [ebp - 0x42c]
push eax
mov eax, dword [ebp - 0x430]
push ecx
push edx
push eax
call dword [sym.imp.MSVCR100.dll__difftime64]
fcomp qword [ebp - 0x3f8]
add esp, 0x14
fnstsw ax
test ah, 0x41
jne 0x1004b7d9
mov byte [ebp - 0x3e5], 1
cmp esi, edi
jb 0x1004b7e4
mov byte [ebp - 0x3e5], 0
cmp esi, edi
jae 0x1004b827
mov ecx, dword [ebx + 0x300c]
call fcn.1013d450
test al, al
jne 0x1004b827
cmp byte [ebp - 0x3e5], al
je 0x1004b782
jmp 0x1004b830
mov eax, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_Timeout_waiting_for_log_packets_to_start
push 0x10
push eax
call fcn.10115e20
add esp, 0xc
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10203cc8
mov esp, ebp
pop ebp
ret 0x10
cmp byte [ebp - 0x3e5], 0
je 0x1004b85b
mov ecx, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_Timeout_waiting_for_audio_data_payload
push 0x10
push ecx
call fcn.10115e20
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10203cc8
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebx + 0x300c]
call fcn.1013d460
lea edx, [ebp - 0x428]
push edx
lea edi, [eax + 2]
call dword [sym.imp.MSVCR100.dll__time64]
add esp, 4
lea esp, [esp]
mov ecx, dword [ebx + 0x300c]
call fcn.1013d460
mov esi, eax
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.MSVCR100.dll__time64]
mov ecx, dword [ebp - 0x424]
mov edx, dword [ebp - 0x428]
mov eax, dword [ebp - 0x42c]
push ecx
mov ecx, dword [ebp - 0x430]
push edx
push eax
push ecx
call dword [sym.imp.MSVCR100.dll__difftime64]
fcomp qword [0x1021cda8]
add esp, 0x14
mov byte [ebp - 0x3e5], 1
fnstsw ax
test ah, 0x41
je 0x1004b8da
mov byte [ebp - 0x3e5], 0
cmp esi, edi
jae 0x1004b8f7
mov ecx, dword [ebx + 0x300c]
call fcn.1013d450
test al, al
jne 0x1004b8f7
cmp byte [ebp - 0x3e5], al
je 0x1004b880
jmp 0x1004b900
cmp byte [ebp - 0x3e5], 0
je 0x1004b92b
mov edx, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_Timeout_waiting_for_audio_data_payload
push 0x10
push edx
call fcn.10115e20
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10203cc8
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebx + 0x3008]
push 0x1558
call fcn.100775f0
push 0x3e4009
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebx + 0x300c]
mov edi, eax
add esp, 4
push edi
mov dword [ebp - 0x41c], edi
call fcn.1013d3f0
mov ecx, dword [ebp - 0x3fc]
and al, 1
mov byte [ebp - 0x3e5], al
lea eax, [esi - 2]
mov dword [ecx], eax
xor eax, eax
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x448], eax
mov dword [ebp - 0x400], eax
mov dword [ebp - 0x3fc], eax
mov dword [ebp - 0x404], eax
mov dword [ebp - 0x408], eax
mov dword [ebp - 0x3ec], eax
mov dword [ebp - 0x414], eax
mov dword [ebp - 0x410], eax
lea eax, [esi - 1]
mov dword [ebp - 0x420], eax
imul eax, eax, 0x3e4
add eax, edi
push eax
mov ecx, ebx
call fcn.1004b5d0
mov dword [ebp - 0x3f8], eax
lea eax, [edi + 0x7c8]
mov dword [ebp - 0x3f4], edx
push eax
fild qword [ebp - 0x3f8]
mov ecx, ebx
call fcn.1004b5d0
mov dword [ebp - 0x3f8], eax
mov dword [ebp - 0x3f4], edx
fild qword [ebp - 0x3f8]
dec esi
mov dword [ebp - 0x444], esi
fsubp st(1)
fild dword [ebp - 0x444]
jns 0x1004ba09
fadd qword [0x1021cdf8]
fdivp st(1)
fadd qword [0x1021d6f0]
call fcn.10203bf0
mov dword [ebp - 0x40c], eax
mov eax, 2
mov dword [ebp - 0x3f0], eax
cmp dword [ebp - 0x420], eax
jl 0x1004bc8d
jmp 0x1004ba40
mov ecx, dword [ebp - 0x3f0]
cmp ecx, 2
jne 0x1004bb68
mov edx, dword [edi + 0x7d8]
mov ecx, dword [edi + 0x7dc]
mov eax, dword [edi + 0x7d0]
mov esi, dword [edi + 0x7d4]
mov dword [ebp - 0x404], edx
mov edx, dword [edi + 0x7e0]
mov dword [ebp - 0x434], ecx
mov dword [ebp - 0x408], edx
mov ecx, dword [edi + 0x7e4]
mov dword [ebp - 0x400], eax
mov dword [ebp - 0x3fc], esi
mov dword [ebp - 0x3ec], ecx
cmp eax, 1
je 0x1004bab9
mov edx, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_Packet_Version_is_not_1
push 0x10
push edx
call fcn.10115e20
add esp, 0xc
mov byte [ebp - 0x3e5], 0
cmp esi, 0x1003
je 0x1004bade
mov eax, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_Audio_Source_is_not_FM_RX
push 0x10
push eax
call fcn.10115e20
add esp, 0xc
mov byte [ebp - 0x3e5], 0
cmp dword [ebp - 0x404], 0
je 0x1004bb04
mov ecx, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_Audio_Format_is_not_PCM
push 0x10
push ecx
call fcn.10115e20
add esp, 0xc
mov byte [ebp - 0x3e5], 0
cmp dword [ebp - 0x434], 0
je 0x1004bb2a
mov edx, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_Audio_Direction_is_not_RX
push 0x10
push edx
call fcn.10115e20
add esp, 0xc
mov byte [ebp - 0x3e5], 0
cmp dword [ebp - 0x408], 0xbb80
je 0x1004bb53
mov eax, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_Sample_Rate_is_not_48000__FM_RX_rate_
push 0x10
push eax
call fcn.10115e20
add esp, 0xc
mov byte [ebp - 0x3e5], 0
cmp dword [ebp - 0x3ec], 2
jne 0x1004bf78
mov ecx, dword [ebp - 0x3f0]
jmp 0x1004bbbd
mov edx, dword [ebp - 0x400]
mov eax, ecx
imul eax, eax, 0x3e4
add eax, edi
cmp dword [eax + 8], edx
jne 0x1004bf88
mov edx, dword [ebp - 0x3fc]
cmp dword [eax + 0xc], edx
jne 0x1004bf88
mov edx, dword [ebp - 0x404]
cmp dword [eax + 0x10], edx
jne 0x1004bf88
mov edx, dword [ebp - 0x408]
cmp dword [eax + 0x18], edx
jne 0x1004bf88
mov edx, dword [ebp - 0x3ec]
cmp dword [eax + 0x1c], edx
jne 0x1004bf88
cmp byte [ebp - 0x3e5], 0
je 0x1004bf9e
imul ecx, ecx, 0x3e4
add edi, ecx
push edi
mov ecx, ebx
call fcn.1004b5d0
mov esi, eax
sub esi, dword [ebp - 0x414]
mov ecx, edx
mov dword [ebp - 0x3f8], eax
mov eax, dword [ebp - 0x40c]
mov dword [ebp - 0x3f4], ecx
sbb ecx, dword [ebp - 0x410]
add eax, eax
cdq
cmp ecx, edx
jl 0x1004bc4d
jg 0x1004bc09
cmp esi, eax
jb 0x1004bc4d
cmp dword [ebp - 0x3f0], 2
je 0x1004bc4d
mov eax, dword [ebp - 0x40c]
cdq
push edx
push eax
push ecx
push esi
call fcn.10203ce0
mov ecx, dword [ebp - 0x438]
dec eax
add dword [ecx], eax
mov ecx, dword [edi + 0x20]
mov edx, dword [ebx + 0x3010]
imul ecx, eax
add dword [ebp - 0x43c], ecx
push str._WCNSS_AUDIO_CAPTURE___log_packet_timestamps_indicate_that_packets_were_missed
push 0x10
push edx
call fcn.10115e20
add esp, 0xc
mov eax, dword [edi + 0x20]
add dword [ebp - 0x448], eax
mov eax, dword [ebp - 0x3f0]
mov ecx, dword [ebp - 0x3f8]
mov edx, dword [ebp - 0x3f4]
mov edi, dword [ebp - 0x41c]
inc eax
mov dword [ebp - 0x414], ecx
mov dword [ebp - 0x410], edx
mov dword [ebp - 0x3f0], eax
cmp eax, dword [ebp - 0x420]
jle 0x1004ba40
mov edx, dword [ebp - 0x418]
push 0x1021caa0
push edx
mov dword [ebp - 0x450], 0x10
call dword [sym.imp.MSVCR100.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x1004bfc0
movzx ecx, byte [0x102aa248]
mov eax, dword [str.RIFF]
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
push esi
push 4
lea edx, [ebp - 0xc]
push 1
push edx
mov dword [ebp - 0xc], eax
mov byte [ebp - 8], cl
call edi
mov eax, dword [ebp - 0x448]
add eax, dword [ebp - 0x43c]
push esi
push 1
mov dword [ebp - 0x400], eax
lea edx, [ebp - 0x438]
add eax, 0x24
push 4
push edx
mov dword [ebp - 0x438], eax
call edi
movzx ecx, byte [0x102aa240]
mov eax, dword [str.WAVE]
push esi
push 4
lea edx, [ebp - 0x1c]
push 1
push edx
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], cl
call edi
movzx ecx, byte [0x102aa238]
mov eax, dword [str.fmt]
push esi
push 4
lea edx, [ebp - 0x24]
push 1
push edx
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], cl
call edi
add esp, 0x40
push esi
push 1
lea eax, [ebp - 0x434]
push 4
push eax
mov dword [ebp - 0x434], 0x10
call edi
push esi
push 1
lea ecx, [ebp - 0x418]
push 2
push ecx
mov dword [ebp - 0x418], 1
call edi
movzx edx, word [ebp - 0x3ec]
push esi
push 1
lea eax, [ebp - 0x3fc]
push 2
push eax
mov dword [ebp - 0x3fc], edx
call edi
push esi
push 1
lea ecx, [ebp - 0x408]
push 4
push ecx
call edi
movzx edx, word [ebp - 0x3fc]
imul edx, dword [ebp - 0x408]
add esp, 0x40
push esi
shl edx, 4
shr edx, 3
push 1
mov dword [ebp - 0x404], edx
push 4
lea eax, [ebp - 0x404]
push eax
call edi
mov eax, dword [ebp - 0x3ec]
shl eax, 4
push esi
shr eax, 3
push 1
movzx ecx, ax
lea edx, [ebp - 0x454]
push 2
push edx
mov dword [ebp - 0x454], ecx
call edi
push esi
push 1
lea eax, [ebp - 0x450]
push 2
push eax
call edi
mov ecx, dword [0x1025b378]
mov dl, byte [0x1025b37c]
push esi
push 4
lea eax, [ebp - 0x14]
push 1
push eax
mov dword [ebp - 0x14], ecx
mov byte [ebp - 0x10], dl
call edi
mov ecx, dword [ebp - 0x400]
add esp, 0x40
push esi
push 1
lea edx, [ebp - 0x444]
push 4
push edx
mov dword [ebp - 0x444], ecx
call edi
push 0x3c0
lea eax, [ebp - 0x3e4]
push 0
push eax
call sub.MSVCR100.dll_memset
mov eax, 2
add esp, 0x1c
mov dword [ebp - 0x3f0], eax
cmp dword [ebp - 0x420], eax
jl 0x1004bf60
mov eax, dword [ebp - 0x40c]
mov ecx, dword [ebp - 0x41c]
add eax, eax
cdq
add ecx, 0x7e8
mov dword [ebp - 0x440], eax
mov dword [ebp - 0x43c], edx
mov dword [ebp - 0x3ec], ecx
mov edx, dword [ebp - 0x3ec]
add edx, 0xffffffe0
push edx
mov ecx, ebx
call fcn.1004b5d0
mov dword [ebp - 0x3f8], eax
sub eax, dword [ebp - 0x414]
mov ecx, edx
sbb ecx, dword [ebp - 0x410]
mov dword [ebp - 0x3f4], edx
mov dword [ebp - 0x44c], eax
cmp ecx, dword [ebp - 0x43c]
jl 0x1004bf10
jg 0x1004bec5
cmp eax, dword [ebp - 0x440]
jb 0x1004bf10
cmp dword [ebp - 0x3f0], 2
je 0x1004bf10
mov eax, dword [ebp - 0x40c]
cdq
push edx
push eax
mov eax, dword [ebp - 0x44c]
push ecx
push eax
call fcn.10203ce0
dec eax
je 0x1004bf10
mov dword [ebp - 0x400], eax
lea ecx, [ecx]
mov ecx, dword [ebp - 0x3ec]
mov edx, dword [ecx]
push esi
push edx
lea eax, [ebp - 0x3e4]
push 1
push eax
call edi
add esp, 0x10
dec dword [ebp - 0x400]
jne 0x1004bef0
mov eax, dword [ebp - 0x3ec]
mov ecx, dword [eax]
push esi
push ecx
add eax, 4
push 1
push eax
call edi
mov eax, dword [ebp - 0x3f4]
mov edx, dword [ebp - 0x3f8]
add dword [ebp - 0x3ec], 0x3e4
mov dword [ebp - 0x410], eax
mov eax, dword [ebp - 0x3f0]
inc eax
add esp, 0x10
mov dword [ebp - 0x414], edx
mov dword [ebp - 0x3f0], eax
cmp eax, dword [ebp - 0x420]
jle 0x1004be82
push esi
call dword [sym.imp.MSVCR100.dll_fclose]
mov bl, byte [ebp - 0x3e5]
mov edi, dword [ebp - 0x41c]
add esp, 4
jmp 0x1004bfdf
mov eax, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_Channel_Count_is_not_Stereo__2_
push 0x10
push eax
jmp 0x1004bf96
mov ecx, dword [ebx + 0x3010]
push str._WCNSS_AUDIO_CAPTURE___Error:_WCNSS_Audio_Log_Packet_header_data_is_not_consistent
push 0x10
push ecx
call fcn.10115e20
add esp, 0xc
test edi, edi
je 0x1004bfab
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10203cc8
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 0x418]
mov edx, dword [ebx + 0x3010]
push ecx
push str.Diag_FTM::WCNSS_Audio_Capture_FM_RX__failed_to_open_output_file__s
push 0x10
push edx
call fcn.10115e20
add esp, 0x10
xor bl, bl
test edi, edi
je 0x1004bfec
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.10203cc8
mov esp, ebp
pop ebp
ret 0x10