Function at 0x10019690
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f4
mov eax, dword [0x105520d0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [ebp + 0xc], 3
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 8]
push esi
mov dword [ebp - 0x7e8], ecx
jne 0x100196d8
movzx eax, byte [ecx + 0xc]
mov byte [ebx + 0x1874], al
mov dl, byte [ecx + 0xd]
mov byte [ebx + 0x1875], dl
movzx eax, byte [ecx + 0xe]
mov byte [ebx + 0x1876], al
jmp 0x10019990
cmp byte [ebx + 0x1817], 0
je 0x10019990
cmp byte [ebx + 0x1819], 0
jne 0x10019774
lea esi, [ebx + 0x1017]
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10019700
sub eax, edx
je 0x10019825
push 0x1021caa0
push esi
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [ebx], eax
test eax, eax
jne 0x10019759
mov eax, dword [ebx + 0x28c8]
test eax, eax
je 0x1001973f
push esi
push str.Could_not_open__s
push 0x10
push eax
call fcn.10115e20
add esp, 0x10
mov ebx, dword [ebx + 0x28c8]
test ebx, ebx
je 0x100199aa
push str.Function_QLIB_CGPS_IqPacketParser::GriffonWriteIqBinFile:_unrecoverable_failure.
push 0x10
jmp 0x100199a1
mov ecx, dword [ebp - 0x7e8]
mov byte [ebx + 0x1819], 1
mov byte [ebx + 0x10052cf], 1
mov byte [ebx + 0x10052cc], 1
mov al, byte [ebx + 0x1874]
push edi
test al, al
je 0x1001983e
cmp al, 1
je 0x1001983e
xor edi, edi
cmp byte [0x10454250], 0
je 0x100197e0
mov word [ecx], 0xadde
mov byte [ecx + 2], 0xbe
mov dl, byte [ebx + 0x1875]
mov byte [ecx + 3], dl
mov al, byte [ebx + 0x1876]
mov byte [ecx + 4], al
mov word [ecx + 5], di
mov byte [ecx + 7], 0
mov edx, dword [ebx]
push edx
push 8
push 1
push ecx
call dword [sym.imp.MSVCR100.dll_fwrite]
mov eax, dword [ebx]
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
mov ecx, dword [ebp - 0x7e8]
add esp, 0x14
mov byte [0x10454250], 0
movzx eax, word [ecx + 0xa]
add eax, eax
lea esi, [ecx + 0xc]
je 0x100197fe
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x7d4]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov edi, eax
mov ecx, dword [ebx]
push ecx
lea edx, [edi + edi]
push edx
lea eax, [ebp - 0x7d4]
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
mov ecx, dword [ebx]
push ecx
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x14
jmp 0x1001998f
mov eax, dword [ebx + 0x28c8]
test eax, eax
je 0x1001973f
push esi
push str.No_filename__s
jmp 0x10019734
movzx esi, word [ecx + 0xa]
mov eax, dword [0x105e8a34]
xor edi, edi
mov dword [ebp - 0x7f0], esi
mov byte [ebp - 0x7e1], 0
test eax, eax
jne 0x100198e5
mov al, byte [0x105e8a30]
mov cl, byte [ebx + 0x1875]
inc al
mov byte [0x105e8a30], al
mov byte [ebp - 0x7db], al
movzx eax, byte [ebx + 0x1874]
mov byte [ebp - 0x7d7], al
mov eax, dword [ebx]
push eax
mov edx, 0x202e
push 0xc
mov byte [ebp - 0x7d6], cl
mov word [ebp - 0x7d9], dx
mov dl, byte [ebx + 0x1876]
lea ecx, [ebp - 0x7e0]
push 1
push ecx
mov dword [ebp - 0x7e0], 0xefbeadde
mov byte [ebp - 0x7dc], 0xa
mov byte [ebp - 0x7da], 0x3c
mov byte [ebp - 0x7d5], dl
call dword [sym.imp.MSVCR100.dll_fwrite]
mov esi, dword [ebp - 0x7f0]
mov ecx, dword [ebp - 0x7e8]
add esp, 0x10
sub esi, edi
xor eax, eax
mov dword [0x105e8a34], eax
mov edx, 0x78ac8
sub edx, eax
mov dword [ebp - 0x7ec], edx
cmp esi, edx
jl 0x100198f8
mov esi, edx
test esi, esi
jle 0x1001992f
sub dword [ebp - 0x7ec], esi
mov dword [ebp - 0x7f4], esi
jmp 0x10019910
mov dl, byte [ecx + edi + 0xc]
mov byte [eax + 0x1056ff68], dl
inc eax
inc edi
dec dword [ebp - 0x7f4]
jne 0x10019910
mov edx, dword [ebp - 0x7ec]
mov dword [0x105e8a34], eax
cmp edi, dword [ebp - 0x7f0]
jne 0x1001993e
mov byte [ebp - 0x7e1], 1
test edx, edx
jne 0x1001995f
mov ecx, dword [ebx]
push ecx
push eax
push 1
push 0x1056ff68
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
xor eax, eax
mov dword [0x105e8a34], eax
jmp 0x1001997c
jns 0x10019982
mov edx, dword [ebx + 0x28c8]
push str.IQ_Sample_buffering_error.
push 8
push edx
call fcn.10115e20
mov eax, dword [0x105e8a34]
add esp, 0xc
mov ecx, dword [ebp - 0x7e8]
cmp byte [ebp - 0x7e1], 0
je 0x10019856
pop edi
mov ebx, dword [ebx + 0x28c8]
test ebx, ebx
je 0x100199aa
push str.CGPS_IQ_Data_Log_Record_found...
push 8
push ebx
call fcn.10115e20
add esp, 0xc
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.10203cc8
mov esp, ebp
pop ebp
ret 8