Function at 0x140056570
Capabilities:
Get file size
Write file on windows

Disassembly:
push rbp
push rdi
lea rbp, [rsp - 0x4f]
sub rsp, 0xa8
lea rdx, [0x14012bb38]
mov rdi, rcx
call fcn.140024c30
mov edx, eax
shr edx, 0x1f
test dl, dl
jne 0x140056b45
mov qword [rsp + 0xc0], rbx
lea rcx, [rdi + 0x28]
mov qword [rsp + 0xa0], rsi
mov edx, 2
mov qword [rsp + 0x90], r13
mov qword [rsp + 0x88], r14
call fcn.140025da0
mov rcx, qword [rdi + 0x38]
lea r13, [rdi + 0x2b0]
xor ebx, ebx
mov dword [rbp - 0x29], 0x66666163
lea r9, [rbp + 0x77]
mov qword [rdi + 0x2a0], rbx
lea rdx, [rbp - 0x29]
mov qword [rdi + 0x2b8], rbx
mov rsi, rax
mov qword [r13], rbx
lea r8d, [rbx + 8]
mov dword [rbp - 0x25], 0x100
mov dword [rbp + 0x77], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140056c55
cmp dword [rbp + 0x77], 8
jne 0x140056c55
mov rdx, rsi
mov qword [rsp + 0x98], r12
lea rcx, [0x14013f6a0]
mov dword [rbp + 0x13], ebx
call fcn.140028240
lea rsi, [rbx - 1]
lea r12d, [rbx + 0x40]
test al, al
je 0x140056674
imul r8d, dword [rdi + 0x258], 0x22
mov ecx, r12d
mov edx, dword [rbp + 0x13]
mov r9d, ebx
mov dword [rdi + 0x298], 0x34616d69
mov eax, r12d
mov r10d, 0x1100
jmp 0x1400567f1
mov rcx, rdi
call fcn.140024080
mov ecx, eax
shr ecx, 0x1f
test cl, cl
jne 0x140056b1d
mov edx, 2
lea rcx, [rdi + 0x28]
call fcn.140025da0
mov rdx, rbx
lea r8, [0x140130298]
movzx ecx, word [rax + rdx*2]
inc rdx
cmp cx, word [r8 + rdx*2 - 2]
jne 0x1400566c2
cmp rdx, 7
jne 0x1400566a1
mov dword [rdi + 0x298], 0x77616c75
jmp 0x14005670e
mov edx, 2
lea rcx, [rdi + 0x28]
call fcn.140025da0
mov rcx, rbx
lea r8, [0x1401302a8]
nop word [rax + rax]
movzx edx, word [rax + rcx*2]
inc rcx
cmp dx, word [r8 + rcx*2 - 2]
jne 0x1400566fb
cmp rcx, 6
jne 0x1400566e0
cmp dx, word [r8 + rcx*2 - 2]
mov eax, 0x6d63706c
mov ecx, 0x77616c61
cmove eax, ecx
mov dword [rdi + 0x298], eax
mov ecx, dword [rdi + 0x290]
mov edx, 2
mov eax, ecx
mov dword [rbp + 0x1b], 1
imul eax, dword [rdi + 0x258]
mov dword [rbp + 0x17], eax
lea eax, [rcx*8]
lea rcx, [rdi + 0x28]
mov dword [rbp + 0x23], eax
call fcn.140025da0
mov r8, rax
lea r9, [0x14012dc78]
mov rdx, rsi
nop dword [rax]
movzx ecx, word [r8 + rdx*2 + 2]
cmp cx, word [r9 + rdx*2 + 2]
jne 0x140056778
add rdx, 2
cmp rdx, 0xd
je 0x140056911
movzx eax, word [r8 + rdx*2]
cmp ax, word [r9 + rdx*2]
je 0x140056750
mov edx, 2
lea rcx, [rdi + 0x28]
call fcn.140025da0
mov r8, rax
lea r9, [0x14012dc58]
mov rdx, rsi
nop dword [rax]
nop word [rax + rax]
movzx ecx, word [r8 + rdx*2 + 2]
cmp cx, word [r9 + rdx*2 + 2]
jne 0x1400567c8
add rdx, 2
cmp rdx, 0xd
je 0x140056911
movzx eax, word [r8 + rdx*2]
cmp ax, word [r9 + rdx*2]
je 0x1400567a0
mov edx, dword [rbp + 0x13]
mov rax, qword [rdi + 0x20]
movzx ecx, byte [rax + 0x40]
and cl, 1
mov byte [rdi + 0x289], cl
jne 0x1400567e1
or edx, 2
mov r9d, dword [rbp + 0x23]
mov eax, ebx
mov ecx, dword [rbp + 0x1b]
mov r10d, ebx
mov r8d, dword [rbp + 0x17]
bswap edx
bswap r8d
bswap ecx
bswap r9d
mov qword [rsp + 0x80], r15
xorps xmm0, xmm0
mov dword [rdi + 0x2a8], r10d
mov dword [rdi + 0x2c0], eax
mov eax, dword [rdi + 0x260]
mov dword [rbp + 0x13], edx
mov edx, 0x63736564
mov dword [rbp + 0x17], r8d
mov r8d, 0x20
mov dword [rbp + 0x1b], ecx
mov rcx, rdi
cvtsi2sd xmm0, rax
mov eax, dword [rdi + 0x298]
mov dword [rbp + 0xf], eax
mov dword [rbp + 0x23], r9d
lea r9, [rbp + 7]
movsd qword [rbp + 7], xmm0
mov rax, qword [rbp + 7]
bswap rax
mov qword [rbp + 7], rax
mov eax, dword [rdi + 0x258]
bswap eax
mov dword [rbp + 0x1f], eax
call fcn.140057180
mov ecx, dword [rdi + 0x25c]
mov dword [rbp - 0x1d], ecx
lea eax, [rcx - 1]
cmp eax, 1
jbe 0x14005687d
cmp ecx, 5
jb 0x1400568a3
bswap ecx
mov dword [rbp - 0x1d], ecx
lea r9, [rbp - 0x21]
mov rcx, rdi
mov dword [rbp - 0x21], 0x1000000
mov edx, 0x6e616863
mov dword [rbp - 0x19], ebx
mov r8d, recv
call fcn.140057180
mov rsi, qword [str.artist]
mov r15d, 4
mov dword [rbp + 0x6f], ebx
test rsi, rsi
je 0x140056a33
mov r14, rbx
mov rdx, rbx
lea rbx, str.artist
mov r13, 0xffffffffffffffff
mov rcx, qword [rdi + 0x10]
mov edx, dword [rdx + rbx + 8]
mov rax, qword [rcx]
call qword [rax + 0x48]
test rax, rax
je 0x14005691f
mov rcx, r13
inc rcx
cmp byte [rax + rcx], 0
jne 0x1400568e6
mov rax, r13
cmp byte [rsi + rax + 1], 0
lea rax, [rax + 1]
jne 0x1400568f2
add ecx, r15d
lea r15d, [rax + 2]
mov eax, dword [rbp + 0x6f]
add r15d, ecx
inc eax
mov dword [rbp + 0x6f], eax
jmp 0x140056922
mov edx, dword [rbp + 0x13]
or edx, 1
mov dword [rbp + 0x13], edx
jmp 0x1400567cb
mov eax, dword [rbp + 0x6f]
inc r14
mov rdx, r14
shl rdx, 4
mov rsi, qword [rdx + rbx]
test rsi, rsi
jne 0x1400568d0
lea r13, [rdi + 0x2b0]
mov rbx, rsi
test eax, eax
je 0x140056a33
bswap eax
mov r8d, r15d
xor r9d, r9d
mov edx, 0x6f666e69
mov dword [rbp + 0x6f], eax
mov rcx, rdi
call fcn.140057180
mov rcx, qword [rdi + 0x38]
lea r9, [rbp + 0x77]
lea r8d, [rsi + 4]
mov dword [rbp + 0x77], ebx
lea rdx, [rbp + 0x6f]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rsi, qword [str.artist]
test rsi, rsi
je 0x140056a33
mov r15, rbx
lea r13, str.artist
mov rdx, rbx
nop word [rax + rax]
mov rcx, qword [rdi + 0x10]
mov edx, dword [rdx + r13 + 8]
mov rax, qword [rcx]
call qword [rax + 0x48]
mov r14, rax
test rax, rax
je 0x140056a15
mov dword [rbp + 0x77], ebx
mov rcx, 0xffffffffffffffff
cmp byte [rsi + rcx + 1], bl
lea rcx, [rcx + 1]
jne 0x1400569c1
lea r8d, [rcx + 1]
mov qword [rsp + 0x20], rbx
mov rcx, qword [rdi + 0x38]
lea r9, [rbp + 0x77]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, 0xffffffffffffffff
mov dword [rbp + 0x77], ebx
nop
cmp byte [r14 + rax + 1], bl
lea rax, [rax + 1]
jne 0x1400569f0
mov rcx, qword [rdi + 0x38]
lea r8d, [rax + 1]
lea r9, [rbp + 0x77]
mov qword [rsp + 0x20], rbx
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
inc r15
mov rdx, r15
shl rdx, 4
mov rsi, qword [rdx + r13]
test rsi, rsi
jne 0x1400569a0
lea r13, [rdi + 0x2b0]
mov rcx, qword [rdi + 0x38]
lea r8, [rbp + 0x77]
mov r9d, 1
mov dword [rbp + 0x7f], ebx
mov rdx, rbx
mov qword [rbp + 0x77], rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rsi, 0xffffffffffffffff
mov edx, 0x61746164
test eax, eax
mov r15, rsi
mov r8, rsi
mov rcx, rdi
cmovne r15, qword [rbp + 0x77]
xor r9d, r9d
call fcn.140057180
mov rcx, qword [rdi + 0x38]
lea r9, [rbp + 0x77]
lea r8d, [rsi + 5]
mov dword [rbp + 0x77], ebx
lea rdx, [rbp + 0x7f]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rdi + 0x2a8]
test eax, eax
je 0x140056ad6
mov rsi, qword [rdi + 0x2a0]
mov ecx, eax
call fcn.1400b609c
mov qword [rdi + 0x2a0], rax
test rsi, rsi
je 0x140056abf
mov rcx, rsi
call fcn.1400b60a4
cmp qword [rdi + 0x2a0], 0
je 0x140056b10
mov dword [rdi + 0x2ac], ebx
mov rsi, 0xffffffffffffffff
mov r8d, dword [rdi + 0x2c0]
test r8d, r8d
je 0x140056b78
mov edx, dword [rdi + 0x258]
mov rcx, r13
call fcn.1400265b0
test al, al
jne 0x140056b4f
mov rcx, qword [rdi + 0x2a0]
mov qword [rdi + 0x2a0], rbx
test rcx, rcx
je 0x140056b10
call fcn.1400b60a4
mov eax, 0x80040202
mov r15, qword [rsp + 0x80]
mov r12, qword [rsp + 0x98]
mov r13, qword [rsp + 0x90]
mov rsi, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xc0]
mov r14, qword [rsp + 0x88]
add rsp, 0xa8
pop rdi
pop rbp
ret
mov edx, dword [rdi + 0x258]
mov eax, 8
inc edx
mul rdx
cmovo rax, rsi
mov rcx, rax
call fcn.1400b609c
mov qword [rdi + 0x2b8], rax
mov dword [rdi + 0x2c4], ebx
mov rcx, rdi
call fcn.1400246e0
mov rcx, qword [rdi + 0x38]
lea rdx, [rbp + 0x77]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
mov rsi, rbx
cmovne rsi, qword [rbp + 0x77]
sub rsi, r15
cmp dword [rdi + 0x298], 0x34616d69
jne 0x140056bf5
mov rcx, qword [rdi + 0x268]
mov rax, rcx
cqo
and edx, 0x3f
add rax, rdx
and eax, 0x3f
sub rax, rdx
test eax, eax
je 0x140056bf5
bswap rcx
sub r12d, eax
mov qword [rbp - 9], rcx
bswap r12d
mov rcx, rdi
mov dword [rbp + 3], r12d
lea r9, [rbp - 0x11]
mov qword [rbp - 0x11], rbx
mov edx, 0x746b6170
mov dword [rbp - 1], ebx
mov r8d, 0x18
call fcn.140057180
mov rcx, qword [rdi + 0x2a0]
mov qword [rdi + 0x2a0], rbx
test rcx, rcx
je 0x140056c0d
call fcn.1400b60a4
mov rcx, r13
call fcn.140027db0
mov rcx, qword [rdi + 0x2b8]
test rcx, rcx
je 0x140056c26
call fcn.1400b60a4
mov rcx, qword [rdi + 0x38]
xor r9d, r9d
xor r8d, r8d
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor r9d, r9d
lea r8, [rsi - 0xc]
mov edx, 0x61746164
mov rcx, rdi
call fcn.140057180
mov eax, r14d
jmp 0x140056b15
mov eax, 0x80040206
jmp 0x140056b25