Function at 0x40bb50
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov eax, dword [0x00514020]
test eax, eax
mov qword [rsp + 0x80], rcx
mov r13, rdx
mov rsi, r8
je 0x40bdd3
mov rbp, qword [0x00506000]
test dword [rbp], 0x100
jne 0x40bdb0
cmp rsi, r13
jbe 0x40bc68
mov rax, qword [0x00505fb0]
mov rdi, qword [0x00505fd0]
mov r15, qword [0x00505fc0]
mov qword [rsp + 0x20], rax
jmp 0x40bbc7
mov r12d, 1
add r13, r12
cmp rsi, r13
jbe 0x40bc68
mov rax, qword [r15]
mov rbx, r13
sub rbx, qword [rax + 0x28]
add rbx, qword [rdi]
cmp byte [rbx], 0xfe
jne 0x40bbb5
test dword [rbp], 0x100
jne 0x40bc80
movzx ecx, byte [rbx + 1]
call fcn.0040b9c0
test eax, eax
je 0x40bbf8
cmp eax, 0xd
jne 0x40bbb5
lea rcx, [rbx + 1]
call fcn.0040bac0
lea r12d, [rax + 1]
movsxd rax, r12d
add rbx, rax
movzx ecx, byte [rbx]
call fcn.0040b9c0
mov r14d, eax
cmp r14d, 0x14
ja 0x40bbb5
mov eax, 1
mov ecx, r14d
shl rax, cl
test eax, 0x151508
jne 0x40be30
test eax, 0xa8000
jne 0x40bd12
test dword [rbp], 0x100
je 0x40bbb5
lea rcx, str._findcall__tbut_its_a_botch
mov r12d, 1
call sub.msvcrt.dll_puts
add r13, r12
cmp rsi, r13
ja 0x40bbc7
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str._findcall__t0x_lx:callf
mov edx, r13d
call sub.msvcrt.dll_printf
movzx ecx, byte [rbx + 1]
call fcn.0040b9c0
test eax, eax
mov edx, eax
je 0x40bca3
cmp eax, 0xd
jne 0x40bc3d
lea rcx, [rbx + 1]
mov dword [rsp + 0x28], edx
call fcn.0040bac0
lea r12d, [rax + 1]
movsxd rax, r12d
add rbx, rax
movzx ecx, byte [rbx]
call fcn.0040b9c0
test dword [rbp], 0x100
mov r14d, eax
je 0x40bc16
mov edx, dword [rsp + 0x28]
mov ecx, edx
call fcn.0040b840
lea rcx, str._tfirst_operand_is__s
mov rdx, rax
call sub.msvcrt.dll_printf
mov ecx, r14d
call fcn.0040b840
lea rcx, str._tsecond_operand_is__s_n
mov rdx, rax
call sub.msvcrt.dll_printf
cmp r14d, 0x14
jbe 0x40bc1c
jmp 0x40bc3d
movzx ecx, byte [rbx]
call fcn.0040b9c0
lea rcx, [rbx + 1]
cmp eax, 0x11
je 0x40be10
cmp eax, 0x13
je 0x40be75
cmp eax, 0xf
je 0x40be5a
mov ecx, 2
mov r14, r13
call qword [fcn.004c1900]
mov r8d, 0x1f
mov edx, 1
lea rcx, str._reladdr__not_relative_address_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, r14d
call fcn.00409090
test eax, eax
je 0x40bc3d
mov rcx, qword [0x005062c0]
mov rdx, r14
call fcn.0040a200
test rax, rax
mov r9, rax
je 0x40bc3d
test dword [rbp], 0x100
jne 0x40be8e
cmp qword [rax], r14
jne 0x40bbb5
xor r8d, r8d
mov rdx, r9
jmp 0x40be3a
mov rax, qword [rsp + 0x80]
mov r9d, esi
mov r8d, r13d
lea rcx, str._findcall___s:_0x_lx_to_0x_lx_n
mov rdx, qword [rax + 0x10]
call sub.msvcrt.dll_printf
jmp 0x40bb90
lea rcx, [0x00514040]
mov dword [0x00514020], 1
call fcn.00409cd0
mov rax, qword [0x004cbc20]
mov qword [0x00514128], rax
lea rax, [0x00514040]
mov qword [0x00514148], rax
jmp 0x40bb7c
mov rax, qword [0x00505fb0]
mov rax, qword [rax]
mov rax, qword [rax + 8]
call qword [rax + 0x58]
lea r14, [rax + r13 + 2]
jmp 0x40bd61
lea rdx, [0x00514040]
xor r8d, r8d
mov rcx, qword [rsp + 0x80]
call fcn.00402800
mov rcx, rbx
call fcn.0040bac0
add r12d, eax
movsxd r12, r12d
jmp 0x40bbbb
movzx eax, byte [rbx + 1]
lea r14d, [rax - 0x80]
movzx r14d, r14b
sub r14d, 0x7f
movsxd r14, r14d
add r14, r13
jmp 0x40bd61
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rax, qword [rax + 8]
call qword [rax + 0x40]
lea r14, [rax + r13 + 4]
jmp 0x40bd61
lea rcx, str._findcall__tdestpc_0x_lx
mov edx, r14d
mov qword [rsp + 0x28], rax
call sub.msvcrt.dll_printf
mov r9, qword [rsp + 0x28]
lea rcx, str._child__name__s
mov rdx, qword [r9 + 0x10]
call sub.msvcrt.dll_printf
mov r9, qword [rsp + 0x28]
lea rcx, str._child__addr_0x_lx_n
mov edx, dword [r9]
call sub.msvcrt.dll_printf
mov r9, qword [rsp + 0x28]
cmp qword [r9], r14
jne 0x40bc3d
jmp 0x40bda2