Function at 0x40b990
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
sub rsp, 0x3e8
mov rax, qword [0x0046ea40]
xor rax, rsp
mov qword [rsp + 0x3b0], rax
cmp dword [rcx + 8], 0xffffffff
mov qword [r11 - 0x10], rbp
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov rbp, r8
mov rdi, rcx
mov r12d, edx
je 0x40b9cf
mov rcx, qword [rcx]
call fcn.0040aec0
mov qword [rsp + 0x3e0], rbx
mov rbx, qword [rdi]
mov dword [rdi + 8], 0xffffffff
cmp r12d, dword [rbx + 8]
jl 0x40b9f1
mov eax, 0x10000
jmp 0x40bd26
mov qword [rsp + 0x3d0], rsi
xor esi, esi
cmp r12d, dword [rbx + 0x14]
jge 0x40ba42
test rbx, rbx
je 0x40ba42
mov eax, dword [rbx + 0x28]
mov dword [rsp + 0x40], esi
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], esi
lea r8, [rbx + 0x7c]
lea rdx, [rbx + 0x2c]
xor r9d, r9d
mov rcx, rbx
mov qword [rsp + 0x28], rsi
mov dword [rbx + 0x18], eax
mov dword [rbx + 0x14], esi
mov dword [rsp + 0x20], esi
call fcn.0040a420
mov ecx, esi
test eax, eax
sete cl
mov dword [rbx + 0x1c], ecx
mov rax, qword [rdi]
cmp dword [rax + 0x14], r12d
jge 0x40bab7
nop
nop
mov rbx, qword [rdi]
test rbx, rbx
je 0x40baae
cmp dword [rbx + 0x1c], esi
je 0x40baae
mov edx, dword [rbx + 0x14]
add edx, 1
cmp edx, dword [rbx + 8]
je 0x40baae
mov ecx, dword [rbx + 0x54]
mov eax, dword [rbx + 0x4c]
mov dword [rsp + 0x40], esi
add ecx, dword [rbx + 0x50]
mov qword [rsp + 0x38], rsi
mov dword [rbx + 0x14], edx
lea ecx, [rcx + rax + 0x2e]
mov dword [rsp + 0x30], esi
lea r8, [rbx + 0x7c]
add dword [rbx + 0x18], ecx
lea rdx, [rbx + 0x2c]
xor r9d, r9d
mov rcx, rbx
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], esi
call fcn.0040a420
mov ecx, esi
test eax, eax
sete cl
mov dword [rbx + 0x1c], ecx
mov rax, qword [rdi]
cmp dword [rax + 0x14], r12d
jl 0x40ba50
cmp r12d, 0xffffffff
jl 0x40bacd
lea r8, [rsp + 0x60]
mov edx, r12d
mov rcx, rdi
call fcn.0040b1a0
test byte [rsp + 0x168], 0x10
je 0x40bb14
movzx eax, byte [rbp]
cmp al, 0x2f
je 0x40bb03
cmp al, 0x5c
je 0x40bb03
test al, al
je 0x40baed
cmp byte [rbp + 1], 0x3a
je 0x40bb03
lea rcx, [rdi + 0x150]
mov rdx, rbp
call fcn.0040b830
xor eax, eax
jmp 0x40bd1e
mov rdx, rbp
xor ecx, ecx
call fcn.0040b830
xor eax, eax
jmp 0x40bd1e
movzx eax, byte [rbp]
mov r9, rbp
mov rcx, rbp
test al, al
je 0x40bb39
cmp al, 0x2f
je 0x40bb2a
cmp al, 0x5c
jne 0x40bb2e
lea r9, [rcx + 1]
mov al, byte [rcx + 1]
add rcx, 1
test al, al
jne 0x40bb22
lea rdx, [rsp + 0x190]
mov rcx, rbp
sub rdx, rbp
nop
nop
nop
movzx eax, byte [rcx]
add rcx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x40bb50
cmp r9, rbp
jne 0x40bb6e
mov byte [rsp + 0x190], sil
jmp 0x40bb9a
mov rax, r9
sub rax, rbp
mov byte [rsp + rax + 0x190], sil
movzx eax, byte [rsp + 0x190]
cmp al, 0x2f
je 0x40bbd9
cmp al, 0x5c
je 0x40bbd9
test al, al
je 0x40bb9a
cmp byte [rsp + 0x191], 0x3a
je 0x40bbd9
mov qword [rsp + 0x20], r9
lea r8, [rdi + 0x150]
lea rdx, str._s_s_s
lea r9, [rsp + 0x190]
lea rcx, [rsp + 0x2a0]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rdx, [rsp + 0x190]
lea rcx, [rdi + 0x150]
call fcn.0040b830
jmp 0x40bc05
lea r8, [rsp + 0x190]
lea rdx, str._s_s
lea rcx, [rsp + 0x2a0]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rdx, [rsp + 0x190]
xor ecx, ecx
call fcn.0040b830
mov eax, dword [rsp + 0x168]
mov qword [rsp + 0x30], rsi
lea rcx, [rsp + 0x2a0]
mov dword [rsp + 0x28], eax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
mov rbp, rax
jne 0x40bc49
mov eax, 0x200
jmp 0x40bd1e
mov rdx, qword [rdi + 0x140]
mov rcx, qword [rdi]
call fcn.0040a8f0
cmp qword [rdi + 0x148], rsi
jne 0x40bc80
mov ecx, 0x4000
call fcn.0040c600
mov qword [rdi + 0x148], rax
nop
nop
nop
nop
mov rdx, qword [rdi + 0x148]
mov rcx, qword [rdi]
lea r9, [rsp + 0x50]
mov r8d, 0x4000
call fcn.0040ab40
cmp eax, 0xffffff96
mov ebx, eax
je 0x40bd06
test eax, eax
js 0x40bcd5
test eax, eax
jle 0x40bcca
mov rdx, qword [rdi + 0x148]
lea r9, [rsp + 0x54]
mov r8d, eax
mov rcx, rbp
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40bcdc
cmp byte [rsp + 0x50], sil
jne 0x40bce3
test ebx, ebx
jne 0x40bc80
mov esi, 0x5000000
jmp 0x40bd0b
mov esi, 0x400
jmp 0x40bd0b
lea r9, [rsp + 0x17c]
lea r8, [rsp + 0x16c]
lea rdx, [rsp + 0x174]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x40bd0b
mov esi, 0x1000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi]
call fcn.0040aec0
mov eax, esi
mov rsi, qword [rsp + 0x3d0]
mov r12, qword [rsp + 0x3c0]
mov rdi, qword [rsp + 0x3c8]
mov rbp, qword [rsp + 0x3d8]
mov rbx, qword [rsp + 0x3e0]
mov rcx, qword [rsp + 0x3b0]
xor rcx, rsp
call fcn.004346e0
add rsp, 0x3e8
ret