Function at 0x406ca0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [0x4202d8]
test ecx, ecx
je 0x406fe0
mov edx, dword [0x42068c]
test edx, edx
je 0x406fe0
push ebp
push edi
push esi
push ebx
sub esp, 0x12c
mov eax, dword [esp + 0x144]
test eax, eax
js 0x406f60
imul eax, dword [0x4202d4], 0xc28f5c29
add eax, 0x51eb850
ror eax, 2
cmp eax, 0x28f5c28
jbe 0x406fe8
mov eax, dword [esp + 0x140]
lea esi, [esp + 0x36]
mov dword [esp + 0xc], str._010u
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0xea
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__snprintf_s]
mov ebp, dword [0x4202d8]
lea edi, [ebp + ebp*4]
shl edi, 2
cmp edi, 3
jle 0x407018
lea ebx, [edi - 0xc]
mov edx, 0xfffffff7
imul eax, edx, 0xcccccccd
mov ecx, 0x7c
add eax, 0x19999998
ror eax, 2
cmp eax, 0xccccccc
jbe 0x406d6b
lea eax, [edx + 0x13]
and eax, 1
cmp eax, 1
sbb ecx, ecx
and ecx, 0xfffffff2
add ecx, 0x2e
mov byte [esp + edx + 0x49], cl
add edx, 1
cmp edx, ebx
jne 0x406d40
lea eax, [edi + 7]
add edi, 8
mov dword [esp + 0x28], edi
mov byte [esp + eax + 0x36], 0xa
mov eax, dword [esp + 0x144]
sub ebp, 1
lea ebx, [eax + eax*4]
shl ebx, 2
lea eax, [ebx + 0x13]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x148]
movzx edx, byte [eax]
cmp ebp, dword [esp + 0x144]
jle 0x406f80
lea eax, [ebx + 0x16]
test dl, dl
je 0x406f08
mov byte [esp + eax + 0x36], dl
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 1]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x4d], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 2]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x4e], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 3]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x4f], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 4]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x50], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 5]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x51], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 6]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x52], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 7]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x53], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 8]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x54], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 9]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x55], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 0xa]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x56], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 0xb]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x57], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 0xc]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x58], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 0xd]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x59], al
mov eax, dword [esp + 0x148]
movzx eax, byte [eax + 0xe]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x5a], al
mov eax, dword [esp + 0x148]
add ebx, 0x25
movzx eax, byte [eax + 0xf]
test al, al
je 0x406f08
mov byte [esp + ebx + 0x36], al
lea esi, [esi]
mov eax, dword [0x4202d0]
test eax, eax
js 0x406f19
lea eax, [eax + eax*4]
mov byte [esp + eax*4 + 0x49], 0x2f
mov eax, dword [esp + 0x24]
cmp dword [esp + 0x28], 0xeb
mov byte [esp + eax + 0x36], 0x2a
je 0x406ff8
mov eax, dword [0x42068c]
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
call sym._fwrite
add dword [0x4202d4], 1
add esp, 0x12c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x4202d0]
mov dword [esp + 0x144], eax
test eax, eax
jns 0x406cd5
add esp, 0x12c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
add ebx, 0x11
mov byte [esp + 0x2f], dl
call sym._strlen
mov ecx, 0xf
movzx edx, byte [esp + 0x2f]
cmp eax, 0xf
cmovg eax, ecx
sub ebx, eax
lea eax, [ebx + 0xf]
test dl, dl
je 0x406f08
mov ecx, dword [esp + 0x148]
sub ecx, ebx
jmp 0x406fc8
test dl, dl
je 0x406f08
mov byte [esi + ebx], dl
add ebx, 1
movzx edx, byte [ecx + ebx]
cmp eax, ebx
jge 0x406fc0
jmp 0x406f08
ret
call sym._QSEQ_genHeader
jmp 0x406cf2
mov dword [esp + 4], 0x1c4
mov dword [esp], str..._source_qspy_seq.c
call sym._Q_onError
jmp 0x406f30
mov dword [esp + 0x28], 0xb
mov edi, 0xb
mov eax, 0xa
jmp 0x406d80