Function at 0x41a200
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x2024
call fcn.0041e350
mov esi, ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x41a22a
mov edi, eax
cmp eax, 0xffffffff
jne 0x41a24a
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41a22f
mov eax, 6
mov dword [esi + 4], 0
mov dword [esi + 8], eax
mov dword [esi], 1
add esp, 0x2024
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebp, dword [esp + 0x203c]
mov ebx, dword [esp + 0x2038]
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x41a2d7
cmp ebp, 0x1000
mov eax, 0x1000
lea ecx, [esp + 0x10]
mov edx, ebx
cmovb eax, ebp
push eax
call fcn.00405240
add esp, 4
cmp dword [esp + 0x10], 1
jne 0x41a30c
cmp dword [esp + 0x14], 0
je 0x41a5a1
mov eax, dword [esp + 0x14]
cmp eax, ebp
ja 0x41a5f4
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
lea ecx, [esp + 0x24]
mov edx, ebx
push eax
call fcn.00405240
add esp, 4
cmp dword [esp + 0x24], 1
je 0x41a5ff
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
jmp 0x41a31c
test edi, edi
je 0x41a5db
mov dword [esp + 0x24], 0
lea eax, [esp + 0x24]
push 0
push eax
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41a587
mov ecx, dword [esp + 0x24]
xor eax, eax
xor edx, edx
jmp 0x41a594
mov dword [esp + 0xc], edi
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov dword [esp + 8], esi
lea eax, [esp + 0x24]
push 0x2000
push 0
push eax
call fcn.00420190
add esp, 0xc
mov esi, ebx
xor edx, edx
mov ecx, 0x2000
xor ebp, ebp
mov dword [esp + 4], edi
add esi, edi
mov dword [esp], esi
test dx, dx
je 0x41a360
nop dword [eax]
xor eax, eax
test ecx, ecx
jne 0x41a450
jmp 0x41a469
cmp ebx, esi
je 0x41a470
mov al, byte [ebx]
lea esi, [ebx + 1]
movzx edx, al
test al, al
js 0x41a388
mov ebx, esi
mov esi, dword [esp]
xor eax, eax
test ecx, ecx
jne 0x41a450
jmp 0x41a469
mov edi, dword [esp]
cmp esi, edi
je 0x41a3c7
movzx esi, byte [ebx + 1]
add ebx, 2
and esi, 0x3f
and edx, 0x1f
cmp al, 0xdf
jbe 0x41a3d2
mov edi, dword [esp]
cmp ebx, edi
je 0x41a3d7
movzx edi, byte [ebx]
inc ebx
and edi, 0x3f
shl esi, 6
or esi, edi
cmp al, 0xf0
jb 0x41a3e4
mov edi, dword [esp]
cmp ebx, edi
je 0x41a3f2
movzx eax, byte [ebx]
inc ebx
and eax, 0x3f
jmp 0x41a3f6
xor esi, esi
mov ebx, edi
and edx, 0x1f
cmp al, 0xdf
ja 0x41a3a0
shl edx, 6
jmp 0x41a3e7
mov ebx, edi
xor edi, edi
shl esi, 6
or esi, edi
cmp al, 0xf0
jae 0x41a3b7
shl edx, 0xc
or edx, esi
mov esi, dword [esp]
mov edi, dword [esp + 4]
jmp 0x41a414
xor eax, eax
mov ebx, edi
and edx, 7
shl esi, 6
mov edi, dword [esp + 4]
shl edx, 0x12
or esi, edx
or esi, eax
cmp esi, 0x110000
mov edx, esi
mov esi, dword [esp]
je 0x41a470
cmp edx, 0xffff
jbe 0x41a350
add edx, 0xffff0000
mov esi, edx
and edx, 0x3ff
shr esi, 0xa
or edx, 0xdc00
or esi, 0xd800
mov eax, edx
mov edx, esi
mov esi, dword [esp]
test ecx, ecx
je 0x41a469
nop dword [eax + eax]
mov word [esp + ebp*2 + 0x24], dx
inc ebp
add ecx, 0xfffffffe
mov edx, eax
test dx, dx
jne 0x41a350
jmp 0x41a360
mov ebp, 0x1000
jmp 0x41a47c
cmp ebp, 0x1001
jae 0x41a62e
lea eax, [esp + 0x24]
mov dword [esp + 0x10], 0
push 0
lea ecx, [esp + 0x14]
push ecx
push ebp
push eax
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x41a568
mov ebx, dword [esp + 0x10]
lea edx, [esp + 0x24]
cmp ebx, ebp
je 0x41a5b6
jae 0x41a5c8
movzx eax, word [esp + ebx*2 + 0x24]
mov ecx, dword [esp + 0xc]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x312
jae 0x41a4fd
lea eax, [esp + ebx*2 + 0x24]
inc ebx
mov dword [esp + 0x10], 0
push 0
lea edx, [esp + 0x14]
push edx
push 1
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x41a4f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x24]
cmp ebx, ebp
ja 0x41a63c
test ebx, ebx
je 0x41a5b4
add ebx, ebx
xor edi, edi
jmp 0x41a52e
add edi, ecx
add edx, 2
add ebx, 0xfffffffe
je 0x41a5b6
movzx eax, word [edx]
mov ecx, 1
cmp ax, 0x7f
jbe 0x41a520
mov esi, edx
movzx edx, ax
mov ecx, 2
cmp edx, 0x800
mov edx, esi
jb 0x41a520
add eax, 0x2312
xor ecx, ecx
movzx eax, ax
cmp eax, 0x312
setae cl
lea ecx, [ecx + ecx + 1]
jmp 0x41a520
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 8]
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx], 1
jmp 0x41a23f
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 0x41a23f
mov dword [esi + 8], 0x430684
mov dword [esi + 4], 0x1502
jmp 0x41a239
xor edi, edi
mov eax, dword [esp + 8]
mov dword [eax + 4], edi
mov dword [eax], 0
jmp 0x41a23f
mov ecx, ebx
mov edx, ebp
push 0x43069c
call fcn.0042b7b0
add esp, 4
ud2
mov ecx, 0x42f9c2
mov edx, 0x23
push 0x42fa10
call fcn.0042b930
add esp, 4
ud2
mov ecx, eax
mov edx, ebp
push 0x430614
jmp 0x41a645
movsd xmm0, qword [esp + 0x28]
lea eax, [esp + 0x1c]
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
movsd qword [esp + 0x1c], xmm0
push 0x430624
push 0x42f2d4
push eax
call fcn.0042ba50
add esp, 0xc
ud2
mov ecx, ebp
mov edx, 0x1000
push 0x43068c
jmp 0x41a645
mov ecx, ebx
mov edx, ebp
push 0x4306ac
call fcn.0042b8c0
add esp, 4
ud2