Function at 0x100a6320
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x3c
mov ebx, dword [ebp + 0xc]
mov esi, ecx
test ebx, ebx
je 0x100a634a
push edx
call sub.kernel32.dll_GetStdHandle
test eax, eax
je 0x100a6356
mov edi, eax
cmp eax, 0xffffffff
jne 0x100a6369
call sub.kernel32.dll_GetLastError
jmp 0x100a635b
mov dword [esi + 4], 0
mov byte [esi], 4
jmp 0x100a6361
mov eax, 6
mov byte [esi], 0
mov dword [esi + 4], eax
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x30]
push eax
push edi
call sub.kernel32.dll_GetConsoleMode
test eax, eax
je 0x100a63d9
mov eax, dword [ebp + 0x10]
movzx eax, byte [eax + 4]
test eax, eax
je 0x100a6427
mov ecx, dword [ebp + 8]
cmp al, 4
jae 0x100a659c
movzx ecx, byte [ecx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x100a6482
mov edx, dword [ebp + 0x10]
mov byte [edx + eax], cl
movzx ecx, byte [edx + 4]
inc cl
mov byte [edx + 4], cl
movzx eax, byte [edx]
movzx ebx, byte [eax + 0x101ce4a6]
cmp cl, bl
mov dword [ebp - 0x48], ebx
jae 0x100a64a0
mov dword [esi + 4], 1
mov byte [esi], 4
jmp 0x100a6361
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 0x100a641c
push 0xffffffffffffffff
push edi
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [ebp - 0x14]
cmp eax, 0x103
je 0x100a65cc
test eax, eax
js 0x100a648b
mov eax, dword [ebp - 0x10]
mov bl, 4
jmp 0x100a6493
cmp ebx, 0x1000
mov eax, 0x1000
cmovb eax, ebx
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x3c]
push eax
call dbg.from_utf8
add esp, 4
cmp dword [ebp - 0x3c], 0
je 0x100a64d4
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x100a64ed
mov edx, dword [ebp + 8]
cmp eax, ebx
ja 0x100a6632
lea ecx, [ebp - 0x30]
push eax
call dbg.from_utf8
add esp, 4
cmp dword [ebp - 0x30], 0
jne 0x100a6640
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x28]
jmp 0x100a64da
mov eax, dword [ebp + 0x10]
mov byte [eax + 4], 0
jmp 0x100a64c5
xor ebx, ebx
push eax
call sub.ntdll.dll_RtlNtStatusToDosError
movzx ecx, bl
mov dword [esi + 4], eax
mov dword [esi], ecx
jmp 0x100a6361
movzx eax, cl
cmp cl, 5
jae 0x100a6621
lea ecx, [ebp - 0x3c]
push eax
call dbg.from_utf8
add esp, 4
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x3c], 0
mov byte [eax + 4], 0
je 0x100a6510
mov byte [esi], 2
mov dword [esi + 4], 0x101ce5f8
jmp 0x100a6361
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x34]
mov ecx, esi
mov edx, edi
push ebx
push eax
call dbg.write_valid_utf8_to_console
add esp, 8
jmp 0x100a6361
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x101ce4a6]
cmp ecx, ebx
jbe 0x100a6560
mov ecx, dword [ebp + 0x10]
mov byte [ecx], al
mov byte [ecx + 4], 1
mov al, 4
mov ecx, 1
jmp 0x100a6567
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
cmp ecx, ebx
mov dword [ebp - 0x14], ecx
jne 0x100a6667
lea ecx, [ebp - 0x30]
mov edx, edi
push ebx
push eax
call dbg.write_valid_utf8_to_console
add esp, 8
movzx eax, byte [ebp - 0x30]
cmp al, 4
jne 0x100a6571
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], ebx
cmp eax, ebx
mov dword [ebp - 0x44], eax
je 0x100a63cd
mov dword [ebp - 0x30], 0
lea ecx, [ebp - 0x44]
lea edx, [ebp - 0x14]
push 0x101ce698
jmp 0x100a6679
mov al, 2
mov ecx, 0x101ce5f8
mov dword [esi + 4], ecx
mov byte [esi], al
jmp 0x100a6361
movzx ecx, byte [ebp - 0x2d]
mov byte [esi], al
mov byte [ebp - 0x16], cl
movzx ecx, word [ebp - 0x2f]
movzx edx, byte [ebp - 0x16]
mov word [ebp - 0x18], cx
mov ecx, dword [ebp - 0x2c]
movzx eax, word [ebp - 0x18]
mov byte [esi + 3], dl
mov word [esi + 1], ax
mov dword [esi + 4], ecx
jmp 0x100a6361
mov dword [ebp - 0x30], 0x101ce660
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], str._rustc_9b00956e56009bab2aa15d7bff10916599e3d6d6librarycore_srccharmethods.rs__
mov dword [ebp - 0x24], 0
lea ecx, [ebp - 0x30]
mov edx, 0x101ce668
call dbg.panic_fmt
lea eax, [ebp - 0x48]
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x30], 0x101ce180
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x40], 0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], 0
lea eax, [ebp - 0x44]
lea edx, [ebp - 0x30]
lea ecx, [ebp - 0x3c]
push edx
push eax
push ecx
call dbg.write_fmt<std::sys::pal::windows::stdio::Stderr>
add esp, 0xc
mov edx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x3c]
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 0x101ce678
call dbg.slice_end_index_len_fail
mov ecx, eax
mov edx, ebx
push 0x101ce604
call dbg.slice_end_index_len_fail
movsd xmm0, qword [ebp - 0x2c]
movsd qword [ebp - 0x14], xmm0
lea eax, [ebp - 0x14]
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
push 0x101ce614
push 0x101cc344
push eax
call sym.core::result::unwrap_failed::hb9c5ac622931d85d
mov dword [ebp - 0x30], 0
lea ecx, [ebp - 0x48]
lea edx, [ebp - 0x14]
push 0x101ce688
lea eax, [ebp - 0x30]
push eax
call dbg.assert_failed<usize, usize>
mov esi, eax
push edi
call sub.kernel32.dll_CloseHandle
push esi
call sym.__Unwind_Resume