Function at 0x4161a0
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x2028
call fcn.00421b00
mov ebx, ecx
push edx
call sub.KERNEL32.dll_GetStdHandle
test eax, eax
je 0x4161c8
mov ebp, eax
cmp eax, 0xffffffff
jne 0x4161e8
call sub.KERNEL32.dll_GetLastError
jmp 0x4161cd
mov eax, 6
mov dword [ebx + 4], 0
mov dword [ebx + 8], eax
mov dword [ebx], 1
add esp, 0x2028
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [esp + 0x2040]
mov esi, dword [esp + 0x203c]
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0
push eax
push ebp
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x416274
cmp edi, 0x1000
mov eax, 0x1000
lea ecx, [esp + 4]
cmovb eax, edi
push eax
push esi
push ecx
call fcn.0041fba0
add esp, 0xc
cmp dword [esp + 4], 1
jne 0x4162a0
cmp dword [esp + 8], 0
je 0x416550
mov eax, dword [esp + 8]
cmp eax, edi
ja 0x416588
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebx
lea ecx, [esp + 0x28]
push eax
push esi
push ecx
call fcn.0041fba0
add esp, 0xc
cmp dword [esp + 0x28], 1
je 0x416591
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
jmp 0x4162b0
mov dword [esp + 0x28], 0
lea eax, [esp + 0x28]
push 0
push eax
push edi
push esi
push ebp
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x416537
mov ecx, dword [esp + 0x28]
xor eax, eax
xor edx, edx
jmp 0x416543
mov esi, dword [esp + 8]
mov edi, dword [esp + 0xc]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebx
lea eax, [esp + 0x28]
push 0x2000
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x18], edi
push edi
push esi
lea eax, [esp + 0xc]
push eax
call fcn.00420460
add esp, 0xc
mov ebx, dword [esp + 8]
mov edx, dword [esp + 4]
movzx edi, word [esp + 0xc]
xor esi, esi
mov ecx, 0x2000
mov dword [esp], ebx
test di, di
je 0x416310
nop word cs:[eax + eax]
nop dword [eax]
xor eax, eax
test ecx, ecx
jne 0x416400
jmp 0x416419
cmp edx, ebx
je 0x416420
mov bl, byte [edx]
lea eax, [edx + 1]
movzx edi, bl
test bl, bl
js 0x416338
mov ebx, dword [esp]
mov edx, eax
xor eax, eax
test ecx, ecx
jne 0x416400
jmp 0x416419
mov ebp, dword [esp]
cmp eax, ebp
je 0x416382
movzx eax, byte [edx + 1]
add edx, 2
and eax, 0x3f
and edi, 0x1f
cmp bl, 0xe0
jb 0x41638e
mov ebp, dword [esp]
cmp edx, ebp
je 0x416393
movzx ebp, byte [edx]
inc edx
and ebp, 0x3f
mov dword [esp + 0x1c], ebp
mov ebp, edx
shl eax, 6
add eax, dword [esp + 0x1c]
cmp bl, 0xf0
jb 0x4163a7
cmp ebp, dword [esp]
je 0x4163b1
movzx ebx, byte [ebp]
inc ebp
mov edx, ebp
and ebx, 0x3f
jmp 0x4163b3
xor eax, eax
mov edx, ebp
and edi, 0x1f
cmp bl, 0xe0
jae 0x416351
shl edi, 6
jmp 0x4163aa
mov dword [esp + 0x1c], 0
shl eax, 6
add eax, dword [esp + 0x1c]
cmp bl, 0xf0
jae 0x416371
shl edi, 0xc
mov ebx, dword [esp]
or edi, eax
jmp 0x4163cc
xor ebx, ebx
and edi, 7
shl eax, 6
shl edi, 0x12
or eax, edi
or eax, ebx
mov ebx, dword [esp]
cmp eax, 0x110000
mov edi, eax
je 0x416420
cmp edi, 0xffff
jbe 0x416300
add edi, 0xffff0000
mov ebx, edi
and edi, 0x3ff
shr ebx, 0xa
or edi, 0xdc00
or ebx, 0xd800
mov eax, edi
mov edi, ebx
mov ebx, dword [esp]
test ecx, ecx
je 0x416419
mov word [esp + esi*2 + 0x28], di
inc esi
add ecx, 0xfffffffe
mov edi, eax
test di, di
jne 0x416300
jmp 0x416310
mov esi, 0x1000
jmp 0x41642c
cmp esi, 0x1001
jae 0x4165bd
mov ebx, dword [esp + 0x18]
lea eax, [esp + 0x28]
mov dword [esp + 4], 0
push 0
lea ecx, [esp + 8]
push ecx
push esi
push eax
push dword [esp + 0x24]
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
je 0x416519
mov edi, dword [esp + 4]
lea edx, [esp + 0x28]
cmp edi, esi
je 0x416565
jae 0x416577
movzx eax, word [esp + edi*2 + 0x28]
mov ecx, dword [esp + 0x14]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x311
ja 0x4164ae
lea eax, [esp + edi*2 + 0x28]
inc edi
mov dword [esp + 4], 0
push 0
lea edx, [esp + 8]
push edx
push 1
push eax
push ecx
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
jne 0x4164aa
call sub.KERNEL32.dll_GetLastError
lea edx, [esp + 0x28]
cmp esi, edi
jb 0x4165ca
test edi, edi
je 0x416563
add edi, edi
xor ebx, ebx
jmp 0x4164de
add ebx, ecx
add edx, 2
add edi, 0xfffffffe
je 0x416565
movzx eax, word [edx]
mov ecx, 1
cmp eax, 0x80
jb 0x4164d0
mov esi, edx
movzx edx, ax
mov ecx, 2
cmp edx, 0x800
mov edx, esi
jb 0x4164d0
add eax, 0x2312
xor ecx, ecx
movzx eax, ax
cmp eax, 0x311
seta cl
lea ecx, [ecx + ecx + 1]
jmp 0x4164d0
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [esp + 0x10]
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx], 1
jmp 0x4161dd
call sub.KERNEL32.dll_GetLastError
xor ecx, ecx
mov edx, 1
mov dword [ebx], edx
mov dword [ebx + 4], ecx
mov dword [ebx + 8], eax
jmp 0x4161dd
mov dword [ebx + 8], 0x426550
mov dword [ebx + 4], 0xc02
jmp 0x4161d7
xor ebx, ebx
mov eax, dword [esp + 0x10]
mov dword [eax + 4], ebx
mov dword [eax], 0
jmp 0x4161dd
push 0x426568
push esi
push edi
call fcn.00422f60
add esp, 0xc
ud2
push 0x4264e0
push edi
push eax
jmp 0x4165d1
movsd xmm0, qword [esp + 0x2c]
lea eax, [esp + 0x20]
movsd qword [esp + 0x20], xmm0
push 0x4264f0
push 0x424914
push eax
push 0x2b
push str.called__Result::unwrap____on_an__Err__value
call fcn.00422ff0
add esp, 0x14
ud2
push 0x426558
push 0x1000
push esi
jmp 0x4165d1
push 0x426578
push esi
push edi
call fcn.004230d0
add esp, 0xc
ud2