Function at 0x406390
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x12c
mov eax, dword [esp + 0x150]
mov edi, dword [esp + 0x144]
mov ebp, dword [esp + 0x14c]
mov dword [esp + 0x20], eax
mov eax, dword [0x4202d8]
test eax, eax
je 0x406658
mov esi, dword [0x42068c]
test esi, esi
je 0x406658
mov eax, dword [0x4202d0]
test edi, edi
js 0x406668
mov edx, dword [esp + 0x148]
test edx, edx
js 0x406698
cmp edi, eax
jne 0x4063fb
cmp dword [esp + 0x148], eax
je 0x406658
imul eax, dword [0x4202d4], 0xc28f5c29
add eax, 0x51eb850
ror eax, 2
cmp eax, 0x28f5c28
jbe 0x406880
mov eax, dword [esp + 0x140]
mov dword [esp + 0xc], str._010u
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0x10], eax
lea eax, [esp + 0x36]
mov dword [esp + 4], 0xea
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__snprintf_s]
mov eax, dword [0x4202d8]
lea ebx, [eax + eax*4 - 5]
shl ebx, 2
cmp ebx, 0xfffffff8
jl 0x4069c0
mov ecx, 0xfffffff7
lea eax, [esp + 0x49]
lea esi, [esi]
lea esi, [esi]
imul edx, ecx, 0xcccccccd
add edx, 0x19999998
ror edx, 2
cmp edx, 0xccccccc
ja 0x4066a8
mov byte [eax + ecx], 0x7c
add ecx, 1
cmp ebx, ecx
jne 0x406470
lea esi, [ebx + 0x15]
lea edx, [ebx + 0x13]
mov dword [esp + 0x24], esi
lea eax, [ebx + 0x14]
cmp byte [esp + 0x20], 1
lea ebx, [edi + edi*4]
mov byte [esp + edx + 0x36], 0x7c
sbb esi, esi
shl ebx, 2
mov byte [esp + eax + 0x36], 0xa
and esi, 0xffffffaf
lea ecx, [ebx + 0x13]
mov dword [esp + 0x28], ecx
add esi, 0x7e
cmp edi, dword [esp + 0x148]
jge 0x4066c0
mov eax, dword [esp + 0x148]
lea edi, [eax + eax*4]
shl edi, 2
lea eax, [edi + 0x12]
cmp eax, ecx
jl 0x4069d7
mov edx, ebx
lea eax, [esp + 0x49]
lea esi, [esi]
imul ecx, edx, 0xcccccccd
ror ecx, 2
cmp ecx, 0xccccccc
ja 0x406830
mov byte [eax + edx], 0x2b
add edx, 1
cmp edx, edi
jne 0x4064f8
mov eax, dword [esp + 0x28]
sub edi, 1
sub edi, ebx
add eax, edi
mov byte [esp + eax + 0x36], 0x3e
movzx eax, byte [ebp]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x4c], al
movzx eax, byte [ebp + 1]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x4d], al
movzx eax, byte [ebp + 2]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x4e], al
movzx eax, byte [ebp + 3]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x4f], al
movzx eax, byte [ebp + 4]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x50], al
movzx eax, byte [ebp + 5]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x51], al
movzx eax, byte [ebp + 6]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x52], al
movzx eax, byte [ebp + 7]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x53], al
movzx eax, byte [ebp + 8]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x54], al
movzx eax, byte [ebp + 9]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x55], al
movzx eax, byte [ebp + 0xa]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x56], al
movzx eax, byte [ebp + 0xb]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x57], al
movzx eax, byte [ebp + 0xc]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x58], al
movzx eax, byte [ebp + 0xd]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x59], al
movzx eax, byte [ebp + 0xe]
add ebx, 0x24
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x36], al
lea esi, [esi]
nop
mov eax, dword [0x4202d0]
test eax, eax
js 0x406609
lea eax, [eax + eax*4]
mov byte [esp + eax*4 + 0x49], 0x2f
cmp byte [esp + 0x20], 1
mov esi, dword [esp + 0x28]
sbb eax, eax
and eax, 0xffffffe9
add eax, 0x41
cmp dword [esp + 0x24], 0xea
mov byte [esp + esi + 0x36], al
ja 0x406860
mov eax, dword [0x42068c]
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 8], eax
lea eax, [esp + 0x36]
mov dword [esp], eax
call sym._fwrite
add dword [0x4202d4], 1
add esp, 0x12c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [esp + 0x148]
mov edi, eax
test ebx, ebx
js 0x406698
test edi, edi
js 0x406658
mov ecx, dword [esp + 0x148]
test ecx, ecx
js 0x406658
cmp edi, eax
je 0x4063ee
jmp 0x4063fb
mov dword [esp + 0x148], eax
jmp 0x406675
mov byte [eax + ecx], 0x20
add ecx, 1
cmp ecx, ebx
jne 0x406470
jmp 0x406496
jle 0x406890
mov eax, dword [esp + 0x148]
lea ecx, [ebx + 0x12]
lea edi, [eax + eax*4]
shl edi, 2
lea eax, [edi + 0x13]
mov edx, edi
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x49]
cmp dword [esp + 0x2c], ecx
jg 0x406710
lea esi, [esi]
imul ecx, edx, 0xcccccccd
ror ecx, 2
cmp ecx, 0xccccccc
ja 0x406848
mov byte [eax + edx], 0x2b
add edx, 1
cmp ebx, edx
jne 0x4066f0
mov eax, dword [esp + 0x2c]
mov byte [esp + edi + 0x4a], 0x3c
add ebx, 0x11
mov byte [esp + eax + 0x36], 0x7c
mov dword [esp], ebp
call sym._strlen
mov edx, 0xf
cmp eax, 0xf
cmovg eax, edx
sub ebx, eax
movzx eax, byte [ebp]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x36], al
movzx eax, byte [ebp + 1]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x37], al
movzx eax, byte [ebp + 2]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x38], al
movzx eax, byte [ebp + 3]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x39], al
movzx eax, byte [ebp + 4]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x3a], al
movzx eax, byte [ebp + 5]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x3b], al
movzx eax, byte [ebp + 6]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x3c], al
movzx eax, byte [ebp + 7]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x3d], al
movzx eax, byte [ebp + 8]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x3e], al
movzx eax, byte [ebp + 9]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x3f], al
movzx eax, byte [ebp + 0xa]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x40], al
movzx eax, byte [ebp + 0xb]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x41], al
movzx eax, byte [ebp + 0xc]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x42], al
movzx eax, byte [ebp + 0xd]
test al, al
je 0x4065f8
mov byte [esp + ebx + 0x43], al
movzx eax, byte [ebp + 0xe]
add ebx, 0xe
test al, al
jne 0x4065ef
jmp 0x4065f8
mov ecx, esi
mov byte [eax + edx], cl
add edx, 1
cmp edx, edi
jne 0x4064f8
jmp 0x406518
mov ecx, esi
mov byte [eax + edx], cl
add edx, 1
cmp edx, ebx
jne 0x4066f0
jmp 0x406710
mov dword [esp + 4], 0x157
mov dword [esp], str..._source_qspy_seq.c
call sym._Q_onError
jmp 0x40662c
call sym._QSEQ_genHeader
jmp 0x406418
movzx edx, byte [ebp]
lea eax, [ebx + 0x16]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 1]
lea eax, [ebx + 0x17]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 2]
lea eax, [ebx + 0x18]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 3]
lea eax, [ebx + 0x19]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 4]
lea eax, [ebx + 0x1a]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 5]
lea eax, [ebx + 0x1b]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 6]
lea eax, [ebx + 0x1c]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 7]
lea eax, [ebx + 0x1d]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 8]
lea eax, [ebx + 0x1e]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 9]
lea eax, [ebx + 0x1f]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 0xa]
lea eax, [ebx + 0x20]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 0xb]
lea eax, [ebx + 0x21]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 0xc]
lea eax, [ebx + 0x22]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 0xd]
lea eax, [ebx + 0x23]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
movzx edx, byte [ebp + 0xe]
lea eax, [ebx + 0x24]
test dl, dl
je 0x406990
mov byte [esp + eax + 0x36], dl
lea eax, [ebx + 0x25]
mov byte [esp + eax + 0x36], 0x5d
lea edx, [eax + 1]
cmp edx, dword [esp + 0x24]
jb 0x4069aa
mov byte [esp + eax + 0x37], 0xa
add eax, 2
mov dword [esp + 0x24], eax
mov byte [esp + ebx + 0x4a], 0x3c
mov byte [esp + ebx + 0x4b], 0x2d
jmp 0x4065f8
mov dword [esp + 0x24], 0xc
mov eax, 0xb
mov edx, 0xa
jmp 0x4064a3
lea eax, [ebx + 0x12]
jmp 0x406523