Function at 0x5f8248f3
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f833d35
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x5f837588]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov edx, dword [ebp + 0x10]
and eax, 0x3f
mov ebx, dword [ebp + 0x18]
imul esi, eax, 0x38
sar ecx, 6
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x4c], ecx
mov eax, dword [ecx*4 + 0x5f837620]
mov dword [ebp - 0x54], esi
mov eax, dword [esi + eax + 0x18]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x14]
add eax, edx
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
cmp byte [ebx + 0x14], 0
mov dword [ebp - 0x78], eax
jne 0x5f82496c
mov ecx, ebx
call fcn.5f81f010
mov eax, dword [ebx + 0xc]
mov ebx, dword [ebp + 8]
mov edi, ebx
mov ecx, dword [eax + 8]
xor eax, eax
stosd dword es:[edi], eax
mov dword [ebp - 0x7c], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp - 0x64]
mov edi, eax
mov dword [ebp - 0x44], edi
cmp eax, dword [ebp - 0x50]
jae 0x5f824cb0
xor edx, edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x2c], edx
mov al, byte [edi]
mov byte [ebp - 0x2d], al
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x34], 1
cmp ecx, 0xfde9
jne 0x5f824adf
mov eax, dword [eax*4 + 0x5f837620]
mov ecx, edx
add eax, 0x2e
add eax, esi
mov dword [ebp - 0x2c], eax
cmp byte [eax], 0
je 0x5f8249d3
inc ecx
inc eax
cmp ecx, 5
jl 0x5f8249c7
mov esi, dword [ebp - 0x50]
sub esi, edi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x6c], esi
test ecx, ecx
jle 0x5f824a85
mov eax, dword [ebp - 0x2c]
movzx eax, byte [eax]
movsx eax, byte [eax + 0x5f837480]
inc eax
mov dword [ebp - 0x38], eax
sub eax, ecx
mov dword [ebp - 0x58], eax
cmp eax, esi
jg 0x5f824c22
mov esi, edx
mov edx, dword [ebp - 0x2c]
mov al, byte [edx]
mov byte [ebp + esi - 0x18], al
inc esi
inc edx
cmp esi, ecx
jl 0x5f824a09
mov ebx, dword [ebp - 0x58]
xor edx, edx
test ebx, ebx
jle 0x5f824a30
push ebx
lea eax, [ebp - 0x18]
add eax, ecx
push edi
push eax
call fcn.5f827370
add esp, 0xc
xor edx, edx
mov esi, dword [ebp - 0x34]
mov edi, edx
mov ebx, dword [ebp - 0x54]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x4c]
lea ecx, [ebx + edi]
inc edi
mov eax, dword [eax*4 + 0x5f837620]
mov byte [ecx + eax + 0x2e], dl
cmp edi, esi
jl 0x5f824a3b
push dword [ebp - 0x3c]
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x18]
mov edi, dword [ebp - 0x44]
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x74], eax
xorps xmm0, xmm0
xor eax, eax
movlpd qword [ebp - 0x84], xmm0
cmp dword [ebp - 0x38], 4
push ecx
sete al
inc eax
mov dword [ebp - 0x34], eax
push eax
lea eax, [ebp - 0x74]
jmp 0x5f824abd
movzx eax, byte [edi]
movsx eax, byte [eax + 0x5f837480]
inc eax
mov dword [ebp - 0x58], eax
cmp eax, esi
jg 0x5f824c5d
push dword [ebp - 0x3c]
xor ecx, ecx
mov dword [ebp - 0x38], edi
cmp eax, 4
xorps xmm0, xmm0
lea eax, [ebp - 0x70]
movlpd qword [ebp - 0x70], xmm0
sete cl
inc ecx
push eax
mov dword [ebp - 0x34], ecx
lea eax, [ebp - 0x38]
push ecx
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.5f822d56
add esp, 0x14
cmp eax, 0xffffffff
je 0x5f824cb0
add edi, dword [ebp - 0x58]
mov esi, dword [ebp - 0x54]
dec edi
jmp 0x5f824b6b
mov ecx, dword [eax*4 + 0x5f837620]
mov dword [ebp - 0x6c], ecx
mov ah, byte [esi + ecx + 0x2d]
test ah, 4
je 0x5f824b10
mov al, byte [esi + ecx + 0x2e]
and ah, 0xfb
push dword [ebp - 0x3c]
mov byte [ebp - 0x20], al
mov al, byte [edi]
mov byte [ebp - 0x1f], al
mov byte [esi + ecx + 0x2d], ah
lea eax, [ebp - 0x20]
push 2
push eax
jmp 0x5f824b56
mov eax, dword [ebp - 0x3c]
movzx ecx, byte [edi]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
cmp word [eax + ecx*2], dx
jge 0x5f824b50
lea eax, [edi + 1]
mov dword [ebp - 0x38], eax
cmp eax, dword [ebp - 0x50]
jae 0x5f824c87
push dword [ebp - 0x3c]
lea eax, [ebp - 0x40]
push 2
push edi
push eax
call fcn.5f82048a
add esp, 0x10
cmp eax, 0xffffffff
je 0x5f824cb0
mov edi, dword [ebp - 0x38]
jmp 0x5f824b6b
push dword [ebp - 0x3c]
push 1
push edi
lea eax, [ebp - 0x40]
push eax
call fcn.5f82048a
add esp, 0x10
cmp eax, 0xffffffff
je 0x5f824cb0
inc edi
lea eax, [ebp - 0x28]
mov dword [ebp - 0x44], edi
xor edi, edi
push edi
push edi
push 5
push eax
push dword [ebp - 0x34]
lea eax, [ebp - 0x40]
push eax
push edi
push dword [ebp - 0x78]
call fcn.5f822ef9
add esp, 0x20
mov dword [ebp - 0x38], eax
test eax, eax
je 0x5f824cb0
push edi
lea ecx, [ebp - 0x60]
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5f824ca8
mov eax, dword [ebx + 8]
sub eax, dword [ebp - 0x64]
add eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], eax
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 0x60], eax
jb 0x5f824cb0
cmp byte [ebp - 0x2d], 0xa
jne 0x5f824c0c
push 0xd
pop eax
push edi
mov word [ebp - 0x5c], ax
lea eax, [ebp - 0x60]
push eax
push 1
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5f824ca8
cmp dword [ebp - 0x60], 1
jb 0x5f824cb0
inc dword [ebx + 8]
inc dword [ebx + 4]
mov eax, dword [ebx + 4]
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp - 0x44]
cmp edi, dword [ebp - 0x50]
jae 0x5f824cb0
mov ecx, dword [ebp - 0x7c]
xor edx, edx
jmp 0x5f824998
test esi, esi
jle 0x5f824c58
mov eax, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x54]
mov edi, dword [ebp - 0x48]
lea esi, [ebx + edx]
add esi, ecx
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ecx*4 + 0x5f837620]
mov cl, byte [edi + eax]
mov byte [esi + edx + 0x2e], cl
mov edx, edi
mov esi, dword [ebp - 0x6c]
inc edx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x48], edx
cmp edx, esi
jl 0x5f824c2c
mov ebx, dword [ebp + 8]
add dword [ebx + 4], esi
jmp 0x5f824cb0
test esi, esi
jle 0x5f824c58
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x48]
add edx, dword [ebp - 0x54]
mov ecx, dword [eax*4 + 0x5f837620]
mov al, byte [edi + ebx]
mov byte [edx + ecx + 0x2e], al
mov edx, edi
inc edx
mov dword [ebp - 0x48], edx
cmp edx, esi
jl 0x5f824c64
jmp 0x5f824c55
mov eax, dword [ebp - 0x6c]
mov cl, byte [edi]
mov byte [esi + eax + 0x2e], cl
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax*4 + 0x5f837620]
or byte [esi + eax + 0x2d], 4
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebx + 4], eax
jmp 0x5f824cb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx], eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.5f825c2a
leave
ret