Function at 0x411213
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x58
lea eax, [ebp - 0x18]
mov edi, dword [ebp + 0xc]
mov esi, ecx
mov dword [eax - 4], esp
or dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x4176b0
mov ecx, dword fs:[0]
test edi, edi
mov dword [eax], ecx
mov dword fs:[0], eax
je 0x411266
push edx
call dword [sym.imp.kernel32.dll_GetStdHandle]
cmp eax, 0xffffffff
je 0x411272
mov ebx, eax
test eax, eax
jne 0x411290
mov eax, ebx
push 6
pop ebx
mov dword [esi + 4], ebx
mov dword [esi], eax
jmp 0x41142a
and dword [esi + 4], 0
mov byte [esi], 4
jmp 0x41142a
lea ebx, [ebp - 0x48]
mov ecx, ebx
call fcn.004010d6
cmp byte [ebx], 4
jne 0x411286
mov ebx, dword [ebp - 0x44]
jmp 0x411290
mov eax, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x44]
cmp al, 4
jne 0x41125c
lea eax, [ebp - 0x48]
and dword [eax], 0
push eax
push ebx
call dword [sym.imp.kernel32.dll_GetConsoleMode]
test eax, eax
je 0x411351
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp + 0x10]
movzx eax, byte [ebx + 4]
test eax, eax
je 0x4113a0
mov ecx, dword [ebp + 8]
cmp al, 4
jae 0x411480
mov cl, byte [ecx]
mov edx, ecx
and dl, 0xc0
neg dl
jno 0x4113f0
mov byte [ebx + eax], cl
mov cl, byte [ebx + 4]
inc cl
mov byte [ebx + 4], cl
movzx eax, byte [ebx]
movzx eax, byte [eax + 0x42d5fe]
cmp al, cl
mov dword [ebp - 0x54], eax
ja 0x41146d
mov edi, eax
movzx eax, cl
cmp cl, 5
jae 0x4114f9
lea ecx, [ebp - 0x2c]
mov edx, ebx
push eax
call fcn.00408947
pop eax
lea eax, [ebp - 0x2c]
mov byte [ebx + 4], 0
test byte [eax], 1
jne 0x4113f4
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
cmp ecx, edi
mov dword [ebp - 0x58], ecx
jne 0x41153a
mov edx, dword [ebp - 0x20]
mov ebx, edi
lea edi, [ebp - 0x48]
mov ecx, edi
push ebx
push eax
call fcn.0041157c
pop eax
pop ecx
cmp byte [edi], 4
jne 0x411454
mov eax, dword [ebp - 0x44]
jmp 0x41145f
lea eax, [ebp - 0x50]
mov ecx, 0x103
and dword [eax + 4], 0
mov dword [eax], ecx
push 0
push 0
push edi
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov ecx, 0x103
cmp eax, ecx
jne 0x411395
push 0xffffffffffffffff
push ebx
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x50]
cmp eax, 0x103
je 0x4114a9
test eax, eax
js 0x411403
mov eax, dword [ebp - 0x4c]
mov bl, 4
jmp 0x41140c
mov eax, 0x1000
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
cmp edi, eax
cmovb eax, edi
push eax
call fcn.00408947
pop eax
lea eax, [ebp - 0x2c]
test byte [eax], 1
je 0x411416
cmp dword [ebp - 0x28], 0
je 0x41143b
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp + 8]
cmp eax, edi
ja 0x411508
lea edi, [ebp - 0x48]
mov ecx, edi
push eax
call fcn.00408947
pop eax
cmp dword [edi], 1
je 0x411516
mov eax, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
jmp 0x41141c
mov byte [ebx + 4], 0
mov dword [esi + 4], 0x42f0f4
mov dword [esi], 2
jmp 0x41142a
xor ebx, ebx
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
movzx ecx, bl
mov dword [esi + 4], eax
mov dword [esi], ecx
jmp 0x41142a
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov ecx, esi
push edi
push eax
call fcn.0041157c
pop eax
pop ecx
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x42d5fe]
cmp ecx, edi
jbe 0x4113f4
mov byte [ebx], al
mov byte [ebx + 4], 1
jmp 0x41146d
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
cmp cl, 4
jne 0x411479
cmp eax, ebx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x5c], ebx
jne 0x411552
mov dword [esi + 4], 1
jmp 0x41126a
mov dword [esi], ecx
mov dword [esi + 4], eax
jmp 0x41142a
lea ecx, [ebp - 0x48]
mov edx, 0x42f164
mov dword [ecx], 0x42f15c
mov dword [ecx + 4], 1
and dword [ecx + 0x10], 0
mov dword [ecx + 8], 4
and dword [ecx + 0xc], 0
call fcn.00425ea5
lea eax, [ebp - 0x64]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x48], 0x42ef00
mov dword [ebp - 0x44], 1
and dword [ebp - 0x38], 0
and dword [ebp - 0x10], 0
lea edx, [ebp - 0x48]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x40], ecx
and dword [eax], 0
and dword [ebp - 0x3c], 0
mov byte [eax + 4], 0
lea ecx, [ebp - 0x2c]
push edx
push eax
push ecx
call fcn.00411786
add esp, 0xc
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
call fcn.00411204
push 7
pop ecx
int 0x29
ud2
push 4
pop edx
mov ecx, eax
push 0x42f174
call fcn.00425edf
mov ecx, eax
mov edx, edi
push 0x42f100
call fcn.00425edf
movsd xmm0, qword [ebp - 0x44]
lea eax, [ebp - 0x50]
movsd qword [eax], xmm0
push 0x2b
pop edx
mov ecx, str.called__Result::unwrap____on_an__Err__value
push 0x42f110
push 0x42d994
push eax
call fcn.0042605f
and dword [ebp - 0x48], 0
lea ecx, [ebp - 0x54]
lea edx, [ebp - 0x58]
push 0x42f184
lea eax, [ebp - 0x48]
push eax
call fcn.0042618f
and dword [ebp - 0x48], 0
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x5c]
push 0x42f194
push edi
call fcn.0042618f
push ebp
sub esp, 0x24
add ebp, 0xc
push dword [ebp - 0x20]
call dword [sym.imp.kernel32.dll_CloseHandle]
add esp, 0x24
pop ebp
ret