Function at 0x100104a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x3c
mov edi, dword [ebp + 8]
mov esi, ecx
test edi, edi
je 0x100104cb
mov ebx, edx
push 0xfffffffffffffff4
call sub.KERNEL32.dll_GetStdHandle
test eax, eax
je 0x100104d7
cmp eax, 0xffffffff
jne 0x100104ea
call sub.KERNEL32.dll_GetLastError
jmp 0x100104dc
mov dword [esi + 4], 0
mov byte [esi], 4
jmp 0x100104e2
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 - 0x44], 0
lea ecx, [ebp - 0x44]
push ecx
push eax
mov dword [ebp - 0x18], eax
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x1001055a
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 4]
test eax, eax
je 0x100105a9
cmp al, 3
ja 0x1001070d
movzx ecx, byte [ebx]
mov edi, dword [ebp + 0xc]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x100105f9
mov byte [edi + eax], cl
movzx ecx, byte [edi + 4]
inc cl
mov byte [edi + 4], cl
movzx eax, byte [edi]
movzx ebx, byte [eax + 0x104ef510]
cmp cl, bl
mov dword [ebp - 0x48], ebx
jae 0x10010614
mov dword [esi + 4], 1
mov byte [esi], 4
jmp 0x100104e2
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0x103
lea eax, [ebp - 0x14]
push 0
push 0
push edi
push ebx
push eax
push 0
push 0
push 0
mov edi, dword [ebp - 0x18]
push edi
call sub.ntdll.dll_NtWriteFile
cmp eax, 0x103
jne 0x1001059e
push 0xffffffffffffffff
push edi
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [ebp - 0x14]
cmp eax, 0x103
je 0x1001073f
test eax, eax
js 0x100105ff
mov eax, dword [ebp - 0x10]
mov bl, 4
jmp 0x10010607
cmp edi, 0x1000
mov eax, 0x1000
cmovb eax, edi
lea ecx, [ebp - 0x24]
mov edx, ebx
push eax
call fcn.10004320
add esp, 4
cmp dword [ebp - 0x24], 0
je 0x10010647
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x10010661
cmp eax, edi
ja 0x100107a0
lea edi, [ebp - 0x44]
mov edx, ebx
mov ecx, edi
push eax
call fcn.10004320
add esp, 4
mov ecx, edi
call fcn.100112a0
mov edi, edx
jmp 0x1001064d
mov byte [edi + 4], 0
jmp 0x10010638
xor ebx, ebx
push eax
call sub.ntdll.dll_RtlNtStatusToDosError
movzx ecx, bl
mov dword [esi + 4], eax
mov dword [esi], ecx
jmp 0x100104e2
movzx eax, cl
cmp cl, 5
jae 0x10010792
lea ecx, [ebp - 0x24]
mov edx, edi
push eax
call fcn.10004320
add esp, 4
cmp dword [ebp - 0x24], 0
mov byte [edi + 4], 0
je 0x1001068d
mov byte [esi], 2
mov dword [esi + 4], 0x104ef660
jmp 0x100104e2
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov ecx, esi
push edi
push eax
call fcn.10010ee0
add esp, 8
jmp 0x100104e2
movzx eax, byte [ebx]
movzx ecx, byte [eax + 0x104ef510]
cmp ecx, 2
jb 0x100106e1
cmp ecx, edi
jbe 0x100106e1
mov ecx, dword [ebp + 0xc]
mov dword [esi + 4], 1
mov byte [ecx], al
mov byte [ecx + 4], 1
mov cl, 4
mov byte [esi], cl
jmp 0x100104e2
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
cmp ecx, ebx
mov dword [ebp - 0x14], ecx
jne 0x100107b3
mov edx, dword [ebp - 0x18]
lea edi, [ebp - 0x44]
mov ecx, edi
push ebx
push eax
call fcn.10010ee0
add esp, 8
movzx eax, byte [ebp - 0x44]
cmp al, 4
jne 0x100106f1
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x14], ebx
cmp eax, ebx
mov dword [ebp - 0x2c], eax
je 0x1001054e
mov dword [ebp - 0x44], 0
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x14]
push 0x104ef69c
push edi
jmp 0x100107c9
mov al, 2
mov dword [esi + 4], 0x104ef660
mov byte [esi], al
jmp 0x100104e2
movzx ecx, byte [ebp - 0x41]
movzx edi, word [ebp - 0x43]
mov edx, dword [ebp - 0x40]
mov byte [esi + 3], cl
mov word [esi + 1], di
mov byte [esi], al
mov dword [esi + 4], edx
jmp 0x100104e2
mov dword [ebp - 0x44], str.Unexpected_number_of_bytes_for_incomplete_UTF_8_codepoint.
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x3c], str.called__Option::unwrap____on_a__None__value_rustc_d5c2e9c342b358556da91d61ed4133f6f50fc0c3library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
mov dword [ebp - 0x38], 0
lea ecx, [ebp - 0x44]
mov edx, 0x104ef700
call fcn.10003240
ud2
lea eax, [ebp - 0x48]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x44], 0x104ef440
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 0
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x44]
lea ecx, [ebp - 0x24]
push eax
call fcn.1000f940
add esp, 4
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
call fcn.1000fa40
mov ecx, 7
int 0x29
ud2
mov ecx, eax
mov edx, 4
push 0x104ef68c
jmp 0x100107a9
mov ecx, eax
mov edx, edi
push 0x104ef66c
call fcn.10003920
add esp, 4
ud2
mov dword [ebp - 0x44], 0
lea ecx, [ebp - 0x48]
lea edx, [ebp - 0x14]
push 0x104ef6ac
lea eax, [ebp - 0x44]
push eax
call fcn.10010240
add esp, 8
ud2