Function at 0x406d21
Capabilities:
Write file on windows

Disassembly:
push 0x474
mov eax, 0x412fe6
call fcn.00412542
mov esi, dword [ebp + 8]
push 0x200
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x220]
call fcn.00406423
xor ebx, ebx
mov dword [ebp - 4], ebx
push esi
lea ecx, [ebp - 0x220]
call fcn.00406476
xor esi, esi
inc esi
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x220]
call fcn.004059da
test byte [ebp - 0x218], 0x10
je 0x406d87
push esi
push dword [ebp - 0x21c]
lea ecx, [ebp - 0x220]
call fcn.004105ef
push ebx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x234]
call fcn.00406117
jmp 0x406e6c
call fcn.004059da
test byte [ebp - 0x218], 0x10
je 0x406dc0
push 1
push dword [ebp - 0x21c]
lea ecx, [ebp - 0x220]
call fcn.004105ef
push ebx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x244]
call fcn.00406117
mov edx, dword [ebp - 0x244]
mov eax, dword [ebp - 0x234]
mov ecx, dword [ebp - 0x240]
sub edx, eax
sar edx, cl
test edx, edx
je 0x406e20
lea esi, [ebp - 0x234]
lea edi, [ebp - 0x254]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x230]
xor edx, edx
inc edx
shl edx, cl
lea ecx, [ebp - 0x254]
sub eax, edx
mov dword [ebp - 0x254], eax
call fcn.004059fb
cmp ax, 0xd
je 0x406e59
push 0x4016e0
push ebx
lea ecx, [ebp - 0x264]
call fcn.0040602e
mov byte [ebp - 4], 2
push eax
push 1
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x220]
call fcn.0040bc16
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x264]
call fcn.0040609c
push ebx
lea eax, [ebp - 0x270]
push eax
lea ecx, [ebp - 0x22b]
call fcn.00406215
push 0xa
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x220]
call fcn.0040bcda
test eax, eax
lea ecx, [ebp - 0x220]
jne 0x406d9f
call fcn.0040b958
mov edi, dword [ebp - 0x214]
lea ecx, [ebp - 0x220]
call fcn.00406100
mov dword [ebp - 0x228], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x480], ebx
mov dword [ebp - 0x47c], ebx
mov dword [ebp - 0x478], 0x200
mov byte [ebp - 4], 3
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x228]
push edi
push ebx
push eax
call fcn.0040ee37
mov esi, eax
cmp esi, 0x1fffff00
jle 0x406efb
push ebx
push ebx
push 1
push 0xc0000095
call dword [sym.imp.KERNEL32.dll_RaiseException]
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x480]
call fcn.00405ece
push ebx
push ebx
push esi
push eax
push dword [ebp - 0x228]
mov dword [ebp - 0x238], eax
push edi
push ebx
push dword [ebp - 0x224]
call fcn.0040ee37
cmp eax, ebx
mov dword [ebp - 0x224], eax
jne 0x406f48
cmp dword [ebp - 0x228], ebx
jle 0x406f48
push ebx
push ebx
push 1
push 0x459
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov edi, dword [ebp - 0x238]
push 0xfffffffffffffff5
mov byte [edi + esi], bl
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, ebx
je 0x406f73
push ebx
lea ecx, [ebp - 0x248]
push ecx
push dword [ebp - 0x224]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [ebp - 4], 1
cmp dword [ebp - 0x480], ebx
je 0x406f91
push dword [ebp - 0x480]
call fcn.0040a9fc
pop ecx
mov dword [ebp - 0x480], ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
call fcn.0040631d
call fcn.004125c5
ret 4