Function at 0x100a3f30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x38
mov ebx, dword [ebp + 0xc]
mov esi, ecx
test ebx, ebx
je 0x100a3f5a
push edx
call sub.kernel32.dll_GetStdHandle
test eax, eax
je 0x100a3f66
mov edi, eax
cmp eax, 0xffffffff
jne 0x100a3f79
call sub.kernel32.dll_GetLastError
jmp 0x100a3f6b
mov dword [esi + 4], 0
mov byte [esi], 4
jmp 0x100a3f71
mov eax, 6
mov byte [esi], 0
mov dword [esi + 4], eax
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
push eax
push edi
call sub.kernel32.dll_GetConsoleMode
test eax, eax
je 0x100a3fea
mov ecx, dword [ebp + 0x10]
movzx eax, byte [ecx + 4]
test eax, eax
je 0x100a4038
mov ebx, ecx
mov ecx, dword [ebp + 8]
cmp al, 4
jae 0x100a419d
movzx ecx, byte [ecx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x100a408a
mov byte [ebx + eax], cl
mov edx, ebx
movzx ecx, byte [ebx + 4]
inc cl
mov byte [ebx + 4], cl
movzx eax, byte [ebx]
movzx ebx, byte [eax + 0x101c295c]
cmp cl, bl
mov dword [ebp - 0x44], ebx
jae 0x100a40a5
mov dword [esi + 4], 1
mov byte [esi], 4
jmp 0x100a3f71
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0x103
lea eax, [ebp - 0x14]
push 0
push 0
push ebx
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push edi
call sub.ntdll.dll_NtWriteFile
cmp eax, 0x103
jne 0x100a402d
push 0xffffffffffffffff
push edi
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [ebp - 0x14]
cmp eax, 0x103
je 0x100a41cd
test eax, eax
js 0x100a4090
mov eax, dword [ebp - 0x10]
mov bl, 4
jmp 0x100a4098
cmp ebx, 0x1000
mov eax, 0x1000
cmovb eax, ebx
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x38]
push eax
call dbg.from_utf8
add esp, 4
cmp dword [ebp - 0x38], 0
je 0x100a40d9
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x100a40f2
mov edx, dword [ebp + 8]
cmp eax, ebx
ja 0x100a4233
lea ebx, [ebp - 0x2c]
mov ecx, ebx
push eax
call dbg.from_utf8
add esp, 4
mov ecx, ebx
call dbg.unwrap<&str, core::str::error::Utf8Error>
mov ebx, edx
jmp 0x100a40df
mov byte [ebx + 4], 0
jmp 0x100a40ca
xor ebx, ebx
push eax
call sub.ntdll.dll_RtlNtStatusToDosError
movzx ecx, bl
mov dword [esi + 4], eax
mov dword [esi], ecx
jmp 0x100a3f71
movzx eax, cl
cmp cl, 5
jae 0x100a4222
lea ecx, [ebp - 0x38]
push eax
call dbg.from_utf8
add esp, 4
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x38], 0
mov byte [eax + 4], 0
je 0x100a4121
mov byte [esi], 2
mov dword [esi + 4], 0x101c2aac
jmp 0x100a3f71
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x30]
mov ecx, esi
mov edx, edi
push ebx
push eax
call dbg.write_valid_utf8_to_console
add esp, 8
jmp 0x100a3f71
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x101c295c]
cmp ecx, 2
jb 0x100a4171
cmp ecx, ebx
jbe 0x100a4171
mov ecx, dword [ebp + 0x10]
mov dword [esi + 4], 1
mov byte [ecx], al
mov byte [ecx + 4], 1
mov cl, 4
mov byte [esi], cl
jmp 0x100a3f71
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
cmp ecx, ebx
mov dword [ebp - 0x14], ecx
jne 0x100a4241
lea ecx, [ebp - 0x2c]
mov edx, edi
push ebx
push eax
call dbg.write_valid_utf8_to_console
add esp, 8
movzx eax, byte [ebp - 0x2c]
cmp al, 4
jne 0x100a4181
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], ebx
cmp eax, ebx
mov dword [ebp - 0x40], eax
je 0x100a3fde
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x14]
push 0x101c2b4c
jmp 0x100a4253
mov al, 2
mov dword [esi + 4], 0x101c2aac
mov byte [esi], al
jmp 0x100a3f71
movzx ecx, byte [ebp - 0x29]
movzx edi, word [ebp - 0x2b]
mov edx, dword [ebp - 0x28]
mov byte [esi + 3], cl
mov word [esi + 1], di
mov byte [esi], al
mov dword [esi + 4], edx
jmp 0x100a3f71
mov dword [ebp - 0x2c], 0x101c2b14
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], str._rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrarycore_srccharmethods.rs_
mov dword [ebp - 0x20], 0
lea ecx, [ebp - 0x2c]
mov edx, 0x101c2b1c
call dbg.panic_fmt
lea eax, [ebp - 0x44]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x2c], 0x101c272c
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x3c], 0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x40]
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x38]
push edx
push eax
push ecx
call dbg.write_fmt<std::sys::windows::stdio::Stderr>
add esp, 0xc
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
call dbg.drop_in_place<core::option::Option<std::io::error::Error>>
mov ecx, 7
int 0x29
ud2
mov ecx, eax
mov edx, 4
push 0x101c2b2c
call dbg.slice_end_index_len_fail
mov ecx, eax
mov edx, ebx
push 0x101c2ab8
call dbg.slice_end_index_len_fail
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x44]
lea edx, [ebp - 0x14]
push 0x101c2b3c
lea eax, [ebp - 0x2c]
push eax
call dbg.assert_failed<usize, usize>
mov esi, eax
push edi
call sub.kernel32.dll_CloseHandle
push esi
call sym.__Unwind_Resume
nop word [eax + eax]