Function at 0x14005d880
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xc0
mov qword [rbp - 0x39], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x1402338a8]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov esi, edx
mov rdi, rcx
or ebx, 0xffffffff
cmp edx, ebx
jne 0x14005d8c2
xor eax, eax
jmp 0x14005dac1
mov rax, qword [rcx + 0x40]
cmp qword [rax], 0
je 0x14005d8fc
mov rdx, qword [rcx + 0x58]
movsxd r8, dword [rdx]
mov rcx, r8
add rcx, qword [rax]
cmp qword [rax], rcx
jae 0x14005d8fc
lea ecx, [r8 - 1]
mov dword [rdx], ecx
mov rdx, qword [rdi + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], sil
mov eax, esi
jmp 0x14005dac1
cmp qword [rdi + 0x80], 0
je 0x14005dabf
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x14005d937
mov rdx, qword [rdi + 0x90]
mov rcx, qword [rdi + 0x88]
mov qword [r8], rcx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
cmp qword [rdi + 0x68], 0
jne 0x14005d959
movsx ecx, sil
mov rdx, qword [rdi + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
cmp eax, ebx
cmovne ebx, esi
jmp 0x14005dabf
mov byte [rbp - 1], sil
mov qword [rbp + 0x1f], reloc.WS2_32.dll_ntohs
mov byte [rbp + 7], 0
mov qword [rbp + 0x17], 8
xor eax, eax
mov qword [rbp + 7], rax
mov byte [rbp + 0xf], al
mov r10, qword [rdi + 0x68]
lea rcx, [rbp + 7]
cmp qword [rbp + 0x1f], 0x10
cmovae rcx, qword [rbp + 7]
mov rdx, qword [rbp + 0x17]
add rdx, rcx
lea r8, [rbp + 7]
cmp qword [rbp + 0x1f], 0x10
cmovae r8, qword [rbp + 7]
mov rax, qword [r10]
lea rcx, [rbp - 0x11]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], r8
lea rcx, [rbp - 9]
mov qword [rsp + 0x20], rcx
lea r9, [rbp]
lea r8, [rbp - 1]
lea rdx, [rdi + 0x74]
mov rcx, r10
mov rax, qword [rax + 0x38]
call qword [case.0x140055453.0]
test eax, eax
js 0x14005da7d
cmp eax, 1
jg 0x14005da5f
lea rax, [rbp + 7]
cmp qword [rbp + 0x1f], 0x10
cmovae rax, qword [rbp + 7]
mov r14, qword [rbp - 0x11]
sub r14, rax
je 0x14005da28
lfence
lea rcx, [rbp + 7]
cmp qword [rbp + 0x1f], 0x10
cmovae rcx, qword [rbp + 7]
mov r9, qword [rdi + 0x80]
mov r8, r14
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp r14, rax
jne 0x14005da7d
mov byte [rdi + 0x71], 1
lea rax, [rbp - 1]
cmp qword [rbp - 9], rax
jne 0x14005da5b
test r14, r14
jne 0x14005d97a
cmp qword [rbp + 0x17], 0x20
jae 0x14005da7d
xor r8d, r8d
lea edx, [r14 + 8]
lea rcx, [rbp + 7]
call fcn.14003a950
jmp 0x14005d97a
mov ebx, esi
jmp 0x14005da7d
cmp eax, 3
jne 0x14005da7d
lfence
movsx ecx, byte [rbp - 1]
mov rdx, qword [rdi + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
cmp eax, ebx
cmovne ebx, esi
mov r11, qword [rbp + 0x1f]
cmp r11, 0x10
jb 0x14005dabf
lea rdx, [r11 + 1]
mov r9, qword [rbp + 7]
mov rax, r9
cmp rdx, 0x1000
jb 0x14005dab7
add rdx, 0x27
mov r9, qword [r9 - 8]
sub rax, r9
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005dab7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, r9
call fcn.14015449c
mov eax, ebx
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140154030
mov rbx, qword [rsp + 0x100]
add rsp, 0xc0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret