Function at 0x416c20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a1da3
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
mov eax, dword [0x4cf22c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 8]
mov ebx, dword [ebp + 8]
test eax, eax
je 0x416e3f
cmp eax, 0xffffffff
je 0x416e3f
mov esi, dword [edi + 0xc]
push esi
mov dword [ebp - 0x14], esi
call fcn.00465242
add esp, 4
test eax, eax
je 0x416c83
push eax
call fcn.004647e5
add esp, 4
push 0x10c
lea eax, [ebp - 0x138]
mov dword [ebp - 4], 0
push 0
push eax
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
call fcn.0047e610
lea eax, [ebp - 0x128]
mov dword [ebp - 0x130], 0
add esp, 0xc
mov dword [ebp - method.fmt::v9::basic_memory_buffer_char__500__class_std::allocator_char__.virtual_0], vtable.fmt::v9::basic_memory_buffer_char__250__class_std::allocator_char__.0
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x12c], 0xfa
mov byte [ebp - 4], 1
lea edx, [ebp - 0x138]
mov ecx, dword [edi + 0x14]
push edx
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [edi + 0x10], 0
je 0x416db8
mov eax, dword [ebx + 0x1c]
cmp dword [ebx + 0x20], eax
jbe 0x416db8
test eax, eax
je 0x416d1a
push 0
push 0
push eax
push dword [ebp - 0x134]
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
mov eax, dword [ebx + 8]
movzx eax, word [edi + eax*2 + 0x18]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x2c]
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x416d3f
mov dword [ebp - 0x14], 7
jmp 0x416d61
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
and ecx, 0xfff0
movzx eax, ax
or ecx, eax
push ecx
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
movzx eax, word [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x1c]
cmp eax, ecx
jbe 0x416d84
push 0
sub eax, ecx
push 0
push eax
mov eax, dword [ebp - 0x134]
add eax, ecx
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
push dword [ebp - 0x14]
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov ecx, dword [ebx + 0x20]
mov eax, dword [ebp - 0x130]
cmp eax, ecx
jbe 0x416dda
push 0
sub eax, ecx
push 0
push eax
mov eax, dword [ebp - 0x134]
add eax, ecx
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
jmp 0x416dda
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push dword [ebp - 0x130]
push dword [ebp - 0x134]
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [ebp - 4], 0
lea eax, [ebp - 0x128]
mov ecx, dword [ebp - 0x134]
mov dword [ebp - method.fmt::v9::basic_memory_buffer_char__500__class_std::allocator_char__.virtual_0], vtable.fmt::v9::basic_memory_buffer_char__250__class_std::allocator_char__.0
cmp ecx, eax
je 0x416e22
mov edx, dword [ebp - 0x12c]
mov eax, ecx
cmp edx, 0x1000
jb 0x416e18
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416e5d
push edx
push ecx
call fcn.00466e3f
add esp, 8
push esi
mov dword [ebp - 4], 2
call fcn.00465267
add esp, 4
test eax, eax
je 0x416e3f
push eax
call fcn.004647e5
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004667cd
mov esp, ebp
pop ebp
ret 4
call fcn.004852a9
int3