Function at 0x40f1d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov esi, dword [ebp + 0xc]
call 0x40f071
pop eax
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], eax
test esi, esi
je 0x40f14f
mov edi, dword [ebp + 8]
lea ebx, [ebp - 0x1c]
jmp 0x40f0a8
test esi, esi
je 0x40f14f
mov ecx, ebx
mov edx, 0xfffffff4
push dword [ebp - 0x28]
push esi
push edi
call sym.std::sys::pal::windows::stdio::write::h34e63c89e3fed0e0
add esp, 0xc
movzx eax, byte [ebp - 0x1c]
cmp eax, 4
jne 0x40f0e0
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x40f157
mov eax, esi
sub eax, ecx
jb 0x40f174
add edi, ecx
mov esi, eax
jmp 0x40f0a0
mov eax, dword [eax*4 + 0x40f1bc]
add eax, dword [ebp - 0x24]
jmp eax
mov eax, dword [ebp - 0x20]
mov byte [eax], 4
jmp 0x40f16c
mov ebx, 0x4a2170
jmp 0x40f161
movsd xmm0, qword [ebx]
mov eax, dword [ebp - 0x20]
movsd qword [eax], xmm0
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, esi
push 0x4a2178
call sym.core::slice::index::slice_start_index_len_fail::h7e8587be95abf61b
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov esi, eax
cmp dword [edx + 4], 0
je 0x40f1a8
mov eax, dword [ebp - 0x10]
cmp dword [eax + 8], 9
jb 0x40f19a
mov ecx, dword [ecx - 4]
push ecx
push 0
push dword [0x4ac0a0]
call sub.KERNEL32.dll_HeapFree
push ebx
push 0
push dword [0x4ac0a0]
call sub.KERNEL32.dll_HeapFree
push esi
call sym.__Unwind_Resume
lock add byte [eax], al
add byte [ebx], bh
add byte [eax], al
sbb al, byte [eax]
add byte [eax], al
add dword [eax], 0
add byte [edi], cl
pop ds
inc eax
add byte [ebp - 0x77], dl
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x40
mov ebx, dword [ebp + 0xc]
mov esi, ecx
test ebx, ebx
je 0x40f1fa
push edx
call sub.KERNEL32.dll_GetStdHandle
test eax, eax
je 0x40f206
mov edi, eax
cmp eax, 0xffffffff
jne 0x40f219
call sub.KERNEL32.dll_GetLastError
jmp 0x40f20b
mov dword [esi + 4], 0
mov byte [esi], 4
jmp 0x40f211
mov eax, 6
mov byte [esi], 0
mov dword [esi + 4], eax
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x24], 0
lea eax, [ebp - 0x24]
push eax
push edi
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x40f289
mov eax, dword [ebp + 0x10]
movzx eax, byte [eax + 4]
test eax, eax
je 0x40f2d7
mov ecx, dword [ebp + 8]
cmp al, 4
jae 0x40f441
movzx ecx, byte [ecx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x40f332
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 + 0x4a28f0]
cmp cl, bl
mov dword [ebp - 0x48], ebx
jae 0x40f350
mov dword [esi + 4], 1
mov byte [esi], 4
jmp 0x40f211
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0x103
lea eax, [ebp - 0x2c]
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 0x40f2cc
push 0xffffffffffffffff
push edi
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [ebp - 0x2c]
cmp eax, 0x103
je 0x40f471
test eax, eax
js 0x40f33b
mov eax, dword [ebp - 0x28]
mov bl, 4
jmp 0x40f343
cmp ebx, 0x1000
mov eax, 0x1000
cmovb eax, ebx
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x38]
push eax
call sym.core::str::converts::from_utf8::hb1736ed88349000a
add esp, 4
cmp dword [ebp - 0x38], 0
je 0x40f384
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40f39d
mov edx, dword [ebp + 8]
cmp eax, ebx
ja 0x40f4d5
lea ecx, [ebp - 0x24]
push eax
call sym.core::str::converts::from_utf8::hb1736ed88349000a
add esp, 4
cmp dword [ebp - 0x24], 0
jne 0x40f4e3
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
jmp 0x40f38a
mov eax, dword [ebp + 0x10]
mov byte [eax + 4], 0
jmp 0x40f375
xor ebx, ebx
push eax
call sub.ntdll.dll_RtlNtStatusToDosError
movzx ecx, bl
mov dword [esi + 4], eax
mov dword [esi], ecx
jmp 0x40f211
movzx eax, cl
cmp cl, 5
jae 0x40f4c4
lea ecx, [ebp - 0x38]
push eax
call sym.core::str::converts::from_utf8::hb1736ed88349000a
add esp, 4
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x38], 0
mov byte [eax + 4], 0
je 0x40f3c0
mov byte [esi], 2
mov dword [esi + 4], 0x4a2a40
jmp 0x40f211
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x30]
mov ecx, esi
mov edx, edi
push ebx
push eax
call sym.std::sys::pal::windows::stdio::write_valid_utf8_to_console::h8eb9e47b28812b0d
add esp, 8
jmp 0x40f211
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x4a28f0]
cmp ecx, ebx
jbe 0x40f414
mov ecx, dword [ebp + 0x10]
mov byte [ecx], al
mov byte [ecx + 4], 1
mov al, 4
mov ecx, 1
jmp 0x40f41b
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
cmp ecx, ebx
mov dword [ebp - 0x4c], ecx
jne 0x40f50a
lea ecx, [ebp - 0x24]
mov edx, edi
push ebx
push eax
call sym.std::sys::pal::windows::stdio::write_valid_utf8_to_console::h8eb9e47b28812b0d
add esp, 8
movzx eax, byte [ebp - 0x24]
cmp al, 4
jne 0x40f425
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], ebx
cmp eax, ebx
mov dword [ebp - 0x40], eax
je 0x40f27d
mov dword [ebp - 0x24], 0
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x2c]
push 0x4a2ae0
lea eax, [ebp - 0x24]
push eax
call sym.core::panicking::assert_failed::h471cccd64b191c96
mov al, 2
mov ecx, 0x4a2a40
mov dword [esi + 4], ecx
mov byte [esi], al
jmp 0x40f211
movzx ecx, byte [ebp - 0x21]
movzx edi, word [ebp - 0x23]
mov edx, dword [ebp - 0x20]
mov byte [esi + 3], cl
mov word [esi + 1], di
mov byte [esi], al
mov dword [esi + 4], edx
jmp 0x40f211
mov dword [ebp - 0x24], 0x4a2aa8
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 4
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x24]
mov edx, 0x4a2ab0
call sym.core::panicking::panic_fmt::h653fda680bf9012e
lea eax, [ebp - 0x44]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x24], 0x4a28bc
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x3c], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], 0
lea edx, [ebp - 0x40]
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x38]
push eax
call sym.std::io::Write::write_fmt::h0f5c472207d58d98
add esp, 4
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
call sym.core::ptr::drop_in_place_LT_core..result..Result_LT__LP__RP__C_std..io..error..Error_GT__GT_::h1766f469e1f57437
mov ecx, 7
int 0x29
ud2
mov ecx, eax
mov edx, 4
push 0x4a2ac0
call sym.core::slice::index::slice_end_index_len_fail::hb7bcdcb5c84f7e98
mov ecx, eax
mov edx, ebx
push 0x4a2a4c
call sym.core::slice::index::slice_end_index_len_fail::hb7bcdcb5c84f7e98
movsd xmm0, qword [ebp - 0x20]
movsd qword [ebp - 0x2c], xmm0
lea eax, [ebp - 0x2c]
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
push 0x4a2a5c
push 0x4a1a70
push eax
call sym.core::result::unwrap_failed::h5441fa6e1130b119
mov dword [ebp - 0x24], 0
lea ecx, [ebp - 0x48]
lea edx, [ebp - 0x4c]
push 0x4a2ad0
lea eax, [ebp - 0x24]
push eax
call sym.core::panicking::assert_failed::h471cccd64b191c96
mov esi, eax
push edi
call sub.KERNEL32.dll_CloseHandle
push esi
call sym.__Unwind_Resume
nop word cs:[eax + eax]
nop dword [eax]