Function at 0x414ad4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x58
lea eax, [ebp - 0x18]
mov edi, dword [ebp + 0xc]
mov esi, ecx
mov dword [eax - 4], esp
or dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x41b6e0
mov ecx, dword fs:[0]
test edi, edi
mov dword [eax], ecx
mov dword fs:[0], eax
je 0x414b27
push edx
call dword [sym.imp.kernel32.dll_GetStdHandle]
cmp eax, 0xffffffff
je 0x414b33
mov ebx, eax
test eax, eax
jne 0x414b51
mov eax, ebx
push 6
pop ebx
mov dword [esi + 4], ebx
mov dword [esi], eax
jmp 0x414cec
and dword [esi + 4], 0
mov byte [esi], 4
jmp 0x414cec
lea ebx, [ebp - 0x48]
mov ecx, ebx
call fcn.0040149c
cmp byte [ebx], 4
jne 0x414b47
mov ebx, dword [ebp - 0x44]
jmp 0x414b51
mov eax, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x44]
cmp al, 4
jne 0x414b1d
lea eax, [ebp - 0x48]
and dword [eax], 0
push eax
push ebx
call dword [sym.imp.kernel32.dll_GetConsoleMode]
test eax, eax
je 0x414c13
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp + 0x10]
movzx eax, byte [ebx + 4]
test eax, eax
je 0x414c62
mov ecx, dword [ebp + 8]
cmp al, 4
jae 0x414d42
mov cl, byte [ecx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x414cb2
mov byte [ebx + eax], cl
mov cl, byte [ebx + 4]
inc cl
mov byte [ebx + 4], cl
movzx eax, byte [ebx]
movzx eax, byte [eax + 0x42e72d]
cmp al, cl
mov dword [ebp - 0x54], eax
ja 0x414d2f
mov edi, eax
movzx eax, cl
cmp cl, 5
jae 0x414dbb
lea ecx, [ebp - 0x2c]
mov edx, ebx
push eax
call fcn.0040b56a
pop eax
lea eax, [ebp - 0x2c]
mov byte [ebx + 4], 0
cmp dword [eax], 0
jne 0x414cb6
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
cmp ecx, edi
mov dword [ebp - 0x58], ecx
jne 0x414dfc
mov edx, dword [ebp - 0x20]
mov ebx, edi
lea edi, [ebp - 0x48]
mov ecx, edi
push ebx
push eax
call fcn.00414e3d
pop eax
pop ecx
cmp byte [edi], 4
jne 0x414d16
mov eax, dword [ebp - 0x44]
jmp 0x414d21
lea eax, [ebp - 0x50]
mov ecx, 0x103
and dword [eax + 4], 0
mov dword [eax], ecx
push 0
push 0
push edi
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov ecx, 0x103
cmp eax, ecx
jne 0x414c57
push 0xffffffffffffffff
push ebx
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x50]
cmp eax, 0x103
je 0x414d6b
test eax, eax
js 0x414cc5
mov eax, dword [ebp - 0x4c]
mov bl, 4
jmp 0x414cce
mov eax, 0x1000
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
cmp edi, eax
cmovb eax, edi
push eax
call fcn.0040b56a
pop eax
lea eax, [ebp - 0x2c]
cmp dword [eax], 0
je 0x414cd8
cmp dword [ebp - 0x28], 0
je 0x414cfd
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp + 8]
cmp eax, edi
ja 0x414dca
lea edi, [ebp - 0x48]
mov ecx, edi
push eax
call fcn.0040b56a
pop eax
cmp dword [edi], 0
jne 0x414dd8
mov eax, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
jmp 0x414cde
mov byte [ebx + 4], 0
mov dword [esi + 4], 0x4307f0
mov dword [esi], 2
jmp 0x414cec
xor ebx, ebx
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
movzx ecx, bl
mov dword [esi + 4], eax
mov dword [esi], ecx
jmp 0x414cec
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov ecx, esi
push edi
push eax
call fcn.00414e3d
pop eax
pop ecx
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x42e72d]
cmp ecx, edi
jbe 0x414cb6
mov byte [ebx], al
mov byte [ebx + 4], 1
jmp 0x414d2f
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
cmp cl, 4
jne 0x414d3b
cmp eax, ebx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x5c], ebx
jne 0x414e14
mov dword [esi + 4], 1
jmp 0x414b2b
mov dword [esi], ecx
mov dword [esi + 4], eax
jmp 0x414cec
lea ecx, [ebp - 0x48]
mov edx, 0x430860
mov dword [ecx], 0x430858
mov dword [ecx + 4], 1
and dword [ecx + 0x10], 0
mov dword [ecx + 8], 4
and dword [ecx + 0xc], 0
call fcn.00429e70
lea eax, [ebp - 0x64]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x48], 0x430544
mov dword [ebp - 0x44], 1
and dword [ebp - 0x38], 0
and dword [ebp - 0x10], 0
lea edx, [ebp - 0x48]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x40], ecx
and dword [eax], 0
and dword [ebp - 0x3c], 0
mov byte [eax + 4], 0
lea ecx, [ebp - 0x2c]
push edx
push eax
push ecx
call fcn.00415095
add esp, 0xc
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
call fcn.00415086
push 7
pop ecx
int 0x29
ud2
push 4
pop edx
mov ecx, eax
push 0x430870
call fcn.00429ee5
mov ecx, eax
mov edx, edi
push 0x4307fc
call fcn.00429ee5
movsd xmm0, qword [ebp - 0x44]
lea eax, [ebp - 0x50]
movsd qword [eax], xmm0
push 0x2b
pop edx
mov ecx, str.called__Result::unwrap____on_an__Err__value
push 0x43080c
push 0x42eb38
push eax
call fcn.0042a07b
and dword [ebp - 0x48], 0
lea ecx, [ebp - 0x54]
lea edx, [ebp - 0x58]
push 0x430880
lea eax, [ebp - 0x48]
push eax
call fcn.0042a1be
and dword [ebp - 0x48], 0
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x5c]
push 0x430890
push edi
call fcn.0042a1be
push ebp
sub esp, 0x24
add ebp, 0xc
push dword [ebp - 0x20]
call sub.kernel32.dll_CloseHandle
add esp, 0x24
pop ebp
ret