Function at 0x140060350
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push r14
lea rbp, [rsp - 0x47]
sub rsp, 0xb0
lea r14, [0x14012bb38]
mov rsi, rcx
mov rdx, r14
call fcn.140024c30
mov edx, eax
shr edx, 0x1f
test dl, dl
jne 0x14006094c
mov rax, qword [rsi + 0x250]
lea rcx, [rsi + 0x28]
mov qword [rsp + 0xd0], rbx
mov edx, 2
mov qword [rsp + 0xa8], rdi
mov qword [rsp + 0xa0], r12
mov qword [rsp + 0x98], r13
mov qword [rsp + 0x90], r15
mov qword [rbp + 0x1f], rax
call fcn.140025da0
mov rdi, 0xffffffffffffffff
mov r8, rax
mov rdx, rdi
nop
movzx ecx, word [r8 + rdx*2 + 2]
xor ebx, ebx
cmp cx, word [r14 + rdx*2 + 2]
jne 0x1400603fa
add rdx, 2
cmp rdx, 0xb
je 0x1400605f8
movzx eax, word [r8 + rdx*2]
cmp ax, word [r14 + rdx*2]
je 0x1400603d0
sbb eax, eax
or eax, 1
mov rcx, qword [rsi + 0x10]
mov edx, 3
mov dword [rbp + 0x6f], eax
neg eax
sbb eax, eax
add eax, 2
mov dword [rbp + 0x7f], eax
mov rax, qword [rcx]
call qword [rax + 0x40]
mov rcx, qword [rsi + 0x10]
mov edx, recv
mov r12, rax
mov r8, qword [rcx]
call qword [r8 + 0x40]
mov rcx, qword [rsi + 0x10]
mov edx, reloc.WSOCK32.dll_recv
mov r14, rax
mov r8, qword [rcx]
call qword [r8 + 0x40]
mov rcx, qword [rsi + 0x10]
mov edx, 5
mov r15, rax
mov r8, qword [rcx]
call qword [r8 + 0x40]
mov ecx, dword [rsi + 0x250]
mov r13, rax
imul ecx, dword [rsi + 0x258]
mov dword [rbp - 0x21], 0x4d524f46
imul ecx, dword [rbp + 0x7f]
add ecx, 0x35
and ecx, 0xfffffffe
mov dword [rbp - 0x1d], ecx
test r12, r12
je 0x140060497
mov rax, rdi
inc rax
cmp byte [r12 + rax], bl
jne 0x140060480
add eax, 2
add ecx, 8
and eax, 0xfffffffe
add ecx, eax
mov dword [rbp - 0x1d], ecx
test r14, r14
je 0x1400604b7
mov rax, rdi
nop
inc rax
cmp byte [r14 + rax], bl
jne 0x1400604a0
add eax, 2
add ecx, 8
and eax, 0xfffffffe
add ecx, eax
mov dword [rbp - 0x1d], ecx
test r15, r15
je 0x1400604d7
mov rax, rdi
nop
inc rax
cmp byte [r15 + rax], bl
jne 0x1400604c0
add eax, 2
add ecx, 8
and eax, 0xfffffffe
add ecx, eax
mov dword [rbp - 0x1d], ecx
test r13, r13
je 0x1400604f4
mov rax, rdi
nop
inc rax
cmp byte [rax + r13], bl
jne 0x1400604e0
add eax, 2
add ecx, 8
and eax, 0xfffffffe
add ecx, eax
cmp dword [rbp + 0x6f], ebx
lea r9, [rbp + 0x6f]
bswap ecx
mov dword [rbp - 0x1d], ecx
lea rdx, [rbp - 0x21]
mov ecx, 0x56533631
mov dword [rbp + 0x6f], ebx
mov eax, 0x58565338
mov qword [rsp + 0x20], rbx
cmove eax, ecx
mov r8d, recv
mov rcx, qword [rsi + 0x38]
mov dword [rbp - 0x19], eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rsi + 0x250]
lea rdx, [rbp - 0x11]
imul eax, dword [rbp + 0x7f]
mov rcx, qword [rsi + 0x10]
mov qword [rbp - 0x35], rbx
mov word [rbp - 0x2b], 1
mov dword [rbp - 0x11], 0x7f0000
mov dword [rbp - 0x39], eax
movzx eax, word [rsi + 0x260]
mov word [rbp - 0x2d], ax
mov eax, 0x10000
mov dword [rbp - 0x29], eax
mov word [rbp - 0xd], 0x3c7f
mov byte [rbp - 0xb], bl
mov dword [rbp - 9], ebx
mov word [rbp - 5], bx
mov byte [rbp - 3], bl
mov qword [rbp - 1], rbx
mov dword [rbp + 7], ebx
mov rax, qword [rcx]
mov byte [rbp + 0x6f], bl
call qword [rax + 0x28]
cmp byte [rbp - 0x11], bl
je 0x140060604
movss xmm0, dword [rbp - 9]
mov eax, 0x10000
mulss xmm0, dword [0x140143680]
mulss xmm0, dword [0x14014367c]
addss xmm0, dword [0x14012bc68]
cvttss2si rdx, xmm0
add edx, 0x10000
cmp edx, eax
cmova edx, eax
cmp byte [rbp - 5], bl
je 0x1400605ff
mov r8d, dword [rbp - 1]
mov ecx, dword [rbp + 3]
cmp r8d, ecx
jae 0x1400605ff
mov r9, qword [rsi + 0x250]
cmp r8, r9
jge 0x1400605ff
cmp rcx, r9
jg 0x1400605ff
mov eax, dword [rbp - 0x39]
sub ecx, r8d
imul ecx, dword [rbp + 0x7f]
mov byte [rbp + 0x6f], 1
cmp ecx, eax
cmova ecx, eax
sub eax, ecx
jmp 0x14006060d
mov eax, ebx
jmp 0x1400603ff
mov byte [rbp + 0x6f], bl
jmp 0x140060607
mov edx, dword [rbp - 0x29]
mov eax, dword [rbp - 0x39]
mov ecx, dword [rbp - 0x35]
ror word [rbp - 0x2d], 8
lea r9, [rbp - 0x39]
bswap eax
mov dword [rbp - 0x39], eax
mov r8d, socket
mov eax, dword [rbp - 0x31]
bswap ecx
bswap edx
bswap eax
mov dword [rbp - 0x35], ecx
mov rcx, rsi
mov dword [rbp - 0x29], edx
mov edx, 0x52444856
mov dword [rbp - 0x31], eax
call fcn.140060960
test r12, r12
je 0x140060673
mov rax, rdi
nop dword [rax + rax]
cmp byte [r12 + rax + 1], bl
lea rax, [rax + 1]
jne 0x140060650
lea r8d, [rax + 2]
mov r9, r12
and r8d, 0xfffffffe
mov edx, 0x454d414e
mov rcx, rsi
call fcn.140060960
test r14, r14
je 0x1400606a3
mov rax, rdi
nop dword [rax + rax]
cmp byte [r14 + rax + 1], bl
lea rax, [rax + 1]
jne 0x140060680
lea r8d, [rax + 2]
mov r9, r14
and r8d, 0xfffffffe
mov edx, 0x544d4f43
mov rcx, rsi
call fcn.140060960
test r15, r15
je 0x1400606d3
mov rax, rdi
nop dword [rax + rax]
cmp byte [r15 + rax + 1], bl
lea rax, [rax + 1]
jne 0x1400606b0
lea r8d, [rax + 2]
mov r9, r15
and r8d, 0xfffffffe
mov edx, 0x20296328
mov rcx, rsi
call fcn.140060960
test r13, r13
je 0x140060703
nop dword [rax + rax]
cmp byte [rdi + r13 + 1], bl
lea rdi, [rdi + 1]
jne 0x1400606e0
lea r8d, [rdi + 2]
mov r9, r13
and r8d, 0xfffffffe
mov edx, 0x48545541
mov rcx, rsi
call fcn.140060960
mov eax, 1
lea r9, [rbp + 0x17]
cmp dword [rsi + 0x258], eax
mov ecx, 6
mov edx, 0x4e414843
cmova eax, ecx
bswap eax
lea r8d, [rcx - 2]
mov dword [rbp + 0x17], eax
mov rcx, rsi
call fcn.140060960
mov rcx, qword [rsi + 0x38]
lea r9, [rbp + 0xf]
mov r8d, 4
mov dword [rbp + 0x77], 0x59444f42
lea rdx, [rbp + 0x77]
mov dword [rbp + 0xf], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsi + 0x38]
lea r8, [rbp + 0xf]
mov r9d, 1
mov qword [rbp + 0xf], rbx
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov r15d, dword [rbp + 0x7f]
lea r9, [rbp + 0x7f]
mov rcx, qword [rsi + 0x38]
lea rdx, [rbp + 0x77]
test eax, eax
mov dword [rbp + 0x7f], ebx
mov eax, dword [rsi + 0x250]
mov r14d, 0xffffffff
cmovne r14d, dword [rbp + 0xf]
mov r8d, 4
imul eax, dword [rsi + 0x258]
mov qword [rsp + 0x20], rbx
imul eax, r15d
inc eax
and eax, 0xfffffffe
bswap eax
mov dword [rbp + 0x77], eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call fcn.140024080
mov r13, qword [rsp + 0x98]
mov ecx, eax
shr ecx, 0x1f
test cl, cl
jne 0x14006092c
mov rcx, rsi
call fcn.1400246e0
mov ecx, eax
shr ecx, 0x1f
test cl, cl
jne 0x14006092c
mov edi, dword [rsi + 0x268]
imul edi, dword [rsi + 0x258]
imul edi, r15d
test dil, 1
je 0x14006082a
mov rcx, qword [rsi + 0x38]
lea r9, [rbp + 0x7f]
mov r8d, 1
mov dword [rbp + 0x77], ebx
lea rdx, [rbp + 0x77]
mov dword [rbp + 0x7f], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r12, qword [rbp + 0x1f]
cmp qword [rsi + 0x268], r12
je 0x14006092a
mov rcx, qword [rsi + 0x38]
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [rsi + 0x268]
lea r9, [rbp + 0x7f]
mov rcx, qword [rsi + 0x38]
lea rdx, [rbp - 0x21]
sub eax, r12d
mov dword [rbp + 0x7f], ebx
imul eax, dword [rsi + 0x258]
mov r8d, recv
mov qword [rsp + 0x20], rbx
imul eax, r15d
add eax, dword [rbp - 0x1d]
bswap eax
mov dword [rbp - 0x1d], eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r9d, dword [rsi + 0x268]
mov ecx, ebx
imul r9d, r15d
cmp byte [rbp + 0x6f], bl
je 0x1400608c9
mov rdx, qword [rsi + 0x250]
mov r10d, dword [rbp - 1]
cmp r10, rdx
jge 0x1400608c9
mov r8d, dword [rbp + 3]
cmp r8, rdx
jg 0x1400608c9
mov ecx, r8d
sub ecx, r10d
imul ecx, r15d
cmp ecx, r9d
cmova ecx, r9d
sub r9d, ecx
bswap ecx
bswap r9d
mov dword [rbp - 0x35], ecx
mov edx, 0x52444856
mov dword [rbp - 0x39], r9d
mov rcx, rsi
lea r9, [rbp - 0x39]
mov r8d, socket
call fcn.140060960
mov rcx, qword [rsi + 0x38]
xor r9d, r9d
mov edx, r14d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [rsi + 0x38]
lea eax, [rdi + 1]
and eax, 0xfffffffe
mov dword [rbp + 0x6f], ebx
bswap eax
lea r9, [rbp + 0x6f]
mov dword [rbp + 0x77], eax
mov r8d, 4
mov qword [rsp + 0x20], rbx
lea rdx, [rbp + 0x77]
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
mov r12, qword [rsp + 0xa0]
mov rdi, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xd0]
mov r15, qword [rsp + 0x90]
add rsp, 0xb0
pop r14
pop rsi
pop rbp
ret