Function at 0x40ef90
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x34
mov ebp, dword [esp + 0x4c]
mov esi, ecx
test ebp, ebp
je 0x40efbb
push edx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x40efca
mov edi, eax
cmp eax, 0xffffffff
jne 0x40efe7
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40efcf
mov dword [esi + 4], 0
mov dword [esi], 0
jmp 0x40efdf
mov eax, 6
mov dword [esi + 4], 0
mov dword [esi + 8], eax
mov dword [esi], 1
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret
lea ebx, [esp + 0x14]
mov dword [esp + 0x14], 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x40f05b
mov ebx, dword [esp + 0x50]
movzx eax, byte [ebx + 4]
test eax, eax
je 0x40f08f
cmp al, 4
jae 0x40f1fb
mov ecx, dword [esp + 0x48]
mov cl, byte [ecx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x40f0f1
mov byte [ebx + eax], cl
mov edx, dword [0x42507c]
mov al, byte [ebx + 4]
inc al
mov byte [ebx + 4], al
movzx ecx, byte [ebx]
movzx ecx, byte [edx + ecx]
cmp cl, al
mov dword [esp + 0x2c], ecx
jbe 0x40f13d
mov dword [esi + 4], 1
jmp 0x40efc2
test edi, edi
je 0x40f214
mov dword [esp + 0x14], 0
push 0
push ebx
push ebp
push dword [esp + 0x54]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f108
mov ecx, dword [esp + 0x14]
xor eax, eax
xor edx, edx
jmp 0x40f115
cmp ebp, 0x1000
mov eax, 0x1000
mov ecx, esp
cmovb eax, ebp
push eax
push dword [esp + 0x4c]
push ecx
call fcn.0041a620
add esp, 0xc
cmp dword [esp], 1
jne 0x40f122
cmp dword [esp + 4], 0
je 0x40f19b
mov eax, dword [esp + 4]
cmp eax, ebp
ja 0x40f234
push eax
push dword [esp + 0x4c]
lea eax, [esp + 0x1c]
push eax
call fcn.0041a620
add esp, 0xc
cmp dword [esp + 0x14], 1
je 0x40f245
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
jmp 0x40f12a
mov byte [ebx + 4], 0
mov dword [esi + 8], 0x420108
mov dword [esi + 4], 0x1502
jmp 0x40efd9
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
mov edx, 1
mov dword [esi], edx
mov dword [esi + 4], ecx
mov dword [esi + 8], eax
jmp 0x40efdf
mov eax, dword [esp + 4]
mov ebx, dword [esp + 8]
mov ecx, esi
mov edx, edi
push ebx
push eax
call fcn.0040f2b0
add esp, 8
jmp 0x40efdf
mov ebp, ecx
movzx ecx, al
cmp al, 5
jae 0x40f22a
mov eax, esp
push ecx
push ebx
push eax
call fcn.0041a620
add esp, 0xc
cmp dword [esp], 1
mov byte [ebx + 4], 0
je 0x40f0f5
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
cmp ecx, ebp
mov dword [esp + 0xc], ecx
jne 0x40f271
lea ebx, [esp + 0x14]
mov edx, edi
mov ecx, ebx
push ebp
push eax
call fcn.0040f2b0
add esp, 8
cmp dword [esp + 0x14], 1
jne 0x40f1bd
movsd xmm0, qword [esp + 0x18]
movsd qword [esi + 4], xmm0
jmp 0x40f1ef
mov eax, dword [esp + 0x48]
mov ecx, dword [0x42507c]
movzx eax, byte [eax]
movzx ecx, byte [ecx + eax]
cmp ecx, 2
jb 0x40f1e1
cmp ecx, ebp
jbe 0x40f1e1
mov byte [ebx], al
mov byte [ebx + 4], 1
jmp 0x40f1d1
mov eax, dword [esp + 0x18]
mov dword [esp + 0xc], ebp
cmp eax, ebp
mov dword [esp + 0x30], eax
jne 0x40f28d
xor eax, eax
mov dword [esi + 4], 1
mov dword [esi], eax
jmp 0x40efdf
mov dword [esi + 8], 0x420108
mov dword [esi + 4], 0x1502
mov eax, 1
mov dword [esi], eax
jmp 0x40efdf
mov ecx, str.Unexpected_number_of_bytes_for_incomplete_UTF_8_codepoint.library_std_src_syswindows_stdio.rs
mov edx, 0x3a
push 0x4200a8
call fcn.0041d580
add esp, 4
ud2
push 0x41f118
push 0x23
push 0x41f0ca
call fcn.0041d6c0
add esp, 0xc
ud2
push 0x420110
push 4
push ecx
jmp 0x40f23b
push 0x420140
push ebp
push eax
call fcn.0041d880
add esp, 0xc
ud2
movsd xmm0, qword [esp + 0x18]
lea eax, [esp + 0xc]
movsd qword [esp + 0xc], xmm0
push 0x420150
push 0x41e8f4
push eax
push 0x2b
push 0x41e8c8
call fcn.0041d7a0
add esp, 0x14
ud2
lea ecx, [esp + 0x2c]
lea edx, [esp + 0xc]
mov dword [esp + 0x14], 0
push 0x420120
lea eax, [esp + 0x18]
push eax
jmp 0x40f2a3
lea ecx, [esp + 0x30]
lea edx, [esp + 0xc]
mov dword [esp + 0x14], 0
push 0x420130
push ebx
call fcn.0041d010
add esp, 8
ud2