Function at 0x418c00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x50
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x422900
mov esi, ecx
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
test edi, edi
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
je 0x418c50
push edx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x418c5c
mov ebx, eax
cmp eax, 0xffffffff
jne 0x418c78
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x418c61
mov dword [esi + 4], 0
mov byte [esi], 4
jmp 0x418c67
mov eax, 6
mov byte [esi], 0
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x418cec
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp + 0x10]
movzx eax, byte [ebx + 4]
test eax, eax
je 0x418d3c
mov ecx, dword [ebp + 8]
cmp al, 4
jae 0x418ebd
movzx ecx, byte [ecx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x418d9a
mov byte [ebx + eax], cl
movzx ecx, byte [ebx + 4]
inc cl
mov byte [ebx + 4], cl
movzx eax, byte [ebx]
movzx eax, byte [eax + 0x447950]
cmp cl, al
mov dword [ebp - 0x5c], eax
jae 0x418db6
mov dword [esi + 4], 1
mov byte [esi], 4
jmp 0x418c67
lea eax, [ebp - 0x28]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0x103
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]
cmp eax, 0x103
jne 0x418d31
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x28]
cmp eax, 0x103
je 0x418eed
test eax, eax
js 0x418da0
mov eax, dword [ebp - 0x24]
mov bl, 4
jmp 0x418da9
mov edx, dword [ebp + 8]
cmp edi, 0x1000
mov eax, 0x1000
lea ecx, [ebp - 0x50]
cmovb eax, edi
push eax
call fcn.00409c80
add esp, 4
cmp dword [ebp - 0x50], 0
je 0x418deb
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x418e05
mov edx, dword [ebp + 8]
cmp eax, edi
ja 0x418f5b
lea ecx, [ebp - 0x44]
push eax
call fcn.00409c80
add esp, 4
cmp dword [ebp - 0x44], 0
mov edx, dword [ebp - 0x20]
jne 0x418f69
mov eax, dword [ebp - 0x40]
mov edi, dword [ebp - 0x3c]
jmp 0x418df4
mov byte [ebx + 4], 0
jmp 0x418ddc
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 0x418c67
mov edi, eax
movzx eax, cl
cmp cl, 5
jae 0x418f4a
lea ecx, [ebp - 0x50]
mov edx, ebx
push eax
call fcn.00409c80
add esp, 4
cmp dword [ebp - 0x50], 0
mov byte [ebx + 4], 0
je 0x418e2c
mov byte [esi], 2
mov dword [esi + 4], 0x447aa0
jmp 0x418c67
mov eax, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x48]
mov edx, dword [ebp - 0x20]
mov ecx, esi
push edi
push eax
call fcn.00418fd0
add esp, 8
jmp 0x418c67
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x447950]
cmp ecx, edi
jbe 0x418e82
mov cl, 4
mov byte [ebx], al
mov dword [esi + 4], 1
mov byte [ebx + 4], 1
mov byte [esi], cl
jmp 0x418c67
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
cmp ecx, edi
mov dword [ebp - 0x28], ecx
jne 0x418f90
mov edx, dword [ebp - 0x20]
mov ebx, edi
lea edi, [ebp - 0x44]
mov ecx, edi
push ebx
push eax
call fcn.00418fd0
add esp, 8
movzx eax, byte [ebp - 0x44]
cmp al, 4
jne 0x418e92
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x28], ebx
cmp eax, ebx
mov dword [ebp - 0x58], eax
je 0x418cdd
mov dword [ebp - 0x44], 0
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x28]
push 0x447b40
push edi
call fcn.00441f50
mov al, 2
mov dword [esi + 4], 0x447aa0
mov byte [esi], al
jmp 0x418c67
movzx ecx, byte [ebp - 0x41]
mov byte [esi], al
mov byte [ebp - 0x2a], cl
movzx ecx, word [ebp - 0x43]
movzx edx, byte [ebp - 0x2a]
mov word [ebp - 0x2c], cx
mov ecx, dword [ebp - 0x40]
movzx eax, word [ebp - 0x2c]
mov byte [esi + 3], dl
mov word [esi + 1], ax
mov dword [esi + 4], ecx
jmp 0x418c67
lea ecx, [ebp - 0x44]
mov edx, 0x447b10
mov dword [ebp - 0x44], 0x447b08
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x3c], str.___rustc_a4472498d7e88041f6206faf4503eb1f246fd427librarycore_srcio_borrowed_buf.rs
mov dword [ebp - 0x38], 0
call fcn.004414f0
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x44], 0x447850
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x20], ebx
mov byte [ebp - 0x54], 0
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x58]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x38], 0
push eax
call fcn.004179b0
add esp, 4
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
call fcn.00417b10
mov ecx, 7
int 0x29
ud2
mov ecx, eax
mov edx, 4
push 0x447b20
call fcn.00441590
mov ecx, eax
mov edx, edi
push 0x447aac
call fcn.00441590
movsd xmm0, qword [ebp - 0x40]
lea eax, [ebp - 0x28]
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
movsd qword [ebp - 0x28], xmm0
push 0x447abc
push 0x4463a4
push eax
call fcn.00441890
mov dword [ebp - 0x44], 0
lea ecx, [ebp - 0x5c]
lea edx, [ebp - 0x28]
push 0x447b30
lea eax, [ebp - 0x44]
push eax
call fcn.00441f50
nop dword [eax + eax]
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