Function at 0x140054df0
Capabilities:
Get file size
Read file on windows

Disassembly:
push rbp
push rbx
push r14
push r15
lea rbp, [rsp - 0x3f]
sub rsp, 0xc8
mov r14, rcx
lea r9, [rbp + 0x67]
mov rcx, qword [rcx + 0x70]
lea rdx, [rbp - 0x29]
xor r15d, r15d
mov ebx, 8
mov r8d, ebx
mov dword [rbp + 0x67], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [rbp - 0x25]
ror ax, 8
cmp dword [rbp - 0x29], 0x66666163
mov word [rbp - 0x25], ax
je 0x140054e54
mov eax, 0x8004020a
add rsp, 0xc8
pop r15
pop r14
pop rbx
pop rbp
ret
cmp ax, 1
je 0x140054e6d
mov eax, 0x8004020c
add rsp, 0xc8
pop r15
pop r14
pop rbx
pop rbp
ret
mov rcx, qword [r14 + 0x70]
lea rdx, [rbp + 0x67]
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xb8], rdi
mov qword [rsp + 0xb0], r12
mov qword [rsp + 0xa8], r13
movaps xmmword [rsp + 0x90], xmm6
mov dword [r14 + 0x2c8], r15d
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
mov rcx, r15
cmovne rcx, qword [rbp + 0x67]
mov qword [rbp - 1], rcx
cmp rcx, rbx
jle 0x140055056
mov r12d, dword [rbp + 0x67]
lea rdi, [0x140000000]
movsd xmm6, qword [0x14012c8e0]
mov r13, 0xffffffffffffffff
mov dword [rbp + 0x6f], r12d
nop
mov rcx, qword [r14 + 0x70]
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [r14 + 0x70]
lea r9, [rbp + 0x77]
mov r8d, recv
mov dword [rbp + 0x77], r15d
lea rdx, [rbp - 0x21]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400559ad
cmp dword [rbp + 0x77], 0xc
jne 0x1400559ad
mov rsi, qword [rbp - 0x1d]
lea rcx, [rbx + 0xc]
mov eax, dword [rbp - 0x21]
bswap rsi
mov qword [rbp - 0x1d], rsi
lea rbx, [rsi + rcx]
mov qword [rbp + 0x7f], rbx
cmp eax, 0x6e616863
ja 0x140055601
je 0x1400554c2
cmp eax, 0x61746164
je 0x140055474
cmp eax, 0x63736564
je 0x1400550d5
cmp eax, 0x696b756b
jne case.0x14005551b.5
test esi, esi
je case.0x14005551b.5
mov eax, dword [r14 + 0x2c8]
cmp eax, 0x6134706d
je 0x140054fed
cmp eax, 0x20636161
je 0x140054fed
cmp eax, 0x63616c61
jne case.0x14005551b.5
mov rcx, qword [r14 + 0x3f0]
test rcx, rcx
je 0x140054fab
call fcn.1400b60a4
movsxd rcx, esi
call fcn.1400b609c
mov rcx, qword [r14 + 0x70]
lea r9, [rbp + 0x77]
mov r8d, esi
mov qword [r14 + 0x3f0], rax
mov rdx, rax
mov dword [rbp + 0x77], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rax, qword [r14 + 0x3f0]
mov ecx, dword [rax + 4]
bswap ecx
test ecx, ecx
je case.0x14005551b.5
mov dword [r14 + 0x2c], ecx
jmp case.0x14005551b.5
movsxd rbx, esi
mov rcx, rbx
call fcn.1400b609c
mov rcx, qword [r14 + 0x70]
lea r9, [rbp + 0x77]
mov r8d, esi
mov dword [rbp + 0x77], r15d
mov rdx, rax
mov qword [rsp + 0x20], r15
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
lea rcx, [r14 + 0x3f8]
mov rdx, rdi
mov qword [rsp + 0x20], rcx
lea r9, [r14 + 0x3f0]
xor ecx, ecx
lea r8, [rdi + rbx]
call fcn.14006c1d0
mov rcx, rdi
call fcn.1400b60a4
lea rdi, [0x140000000]
mov rbx, qword [rbp + 0x7f]
cmp rbx, qword [rbp - 1]
jl 0x140054ee0
cmp qword [r14 + 0x290], 0
je 0x140055a4f
cmp dword [r14 + 0x2c8], 0
je 0x140055a4f
mov rcx, qword [r14 + 0x18]
test rcx, rcx
jne 0x140055a4b
mov edx, dword [r14 + 0x408]
test edx, edx
jne 0x140055097
cmp qword [r14 + 0x400], rcx
je 0x1400559b7
mov r8d, dword [r14 + 0x418]
test r8d, r8d
je 0x1400559b7
mov rax, qword [r14 + 0x400]
test rax, rax
jne 0x1400550c9
mov rax, qword [r14 + 0x2d0]
mov rcx, rdx
cqo
idiv rcx
mov qword [r14 + 0x400], rax
mov rcx, r8
imul rcx, rax
jmp 0x140055a29
cmp rsi, 0x20
jb 0x140055a4f
mov rcx, qword [r14 + 0x70]
lea r9, [rbp + 0x77]
mov r8d, 0x20
mov dword [rbp + 0x77], r15d
lea rdx, [rbp - 0x49]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rax, qword [rbp - 0x49]
mov r10d, dword [rbp - 0x3d]
mov r11d, dword [rbp - 0x39]
mov ecx, dword [rbp - 0x35]
mov r8d, dword [rbp - 0x31]
mov r9d, dword [rbp - 0x2d]
mov edx, dword [rbp - 0x41]
mov dword [r14 + 0x2c8], edx
bswap rax
mov qword [rbp - 0x49], rax
movsd xmm0, qword [rbp - 0x49]
addsd xmm0, xmm6
bswap r11d
mov dword [rbp - 0x39], r11d
mov dword [r14 + 0x408], r11d
bswap ecx
mov dword [rbp - 0x35], ecx
mov dword [r14 + 0x418], ecx
bswap r8d
mov dword [rbp - 0x31], r8d
mov dword [r14 + 0x20], r8d
bswap r9d
mov dword [rbp - 0x2d], r9d
mov dword [r14 + 0x428], r9d
cvttsd2si rax, xmm0
bswap r10d
mov dword [rbp - 0x3d], r10d
mov dword [r14 + 0x28], eax
cmp edx, 0x3643414d
ja 0x1400552be
je 0x140055297
cmp edx, 0x3343414d
ja 0x140055208
je 0x1400551e1
cmp edx, 0x20636161
je 0x140055442
cmp edx, 0x31706d2e
je 0x1400551bc
cmp edx, 0x32706d2e
jne 0x14005599b
lea r8, [0x14012f220]
jmp 0x140055279
lea rcx, [r14 + 0x58]
mov r9d, r13d
lea r8, [0x14012f238]
mov edx, 2
call fcn.140025fb0
mov dword [r14 + 0x2c], 0x180
jmp case.0x14005551b.5
cmp r8d, 2
ja 0x140055991
lea rcx, [r14 + 0x58]
mov r9d, r13d
lea r8, [0x14013f6ec]
mov edx, 2
call fcn.140025fb0
jmp case.0x14005551b.5
cmp edx, 0x33706d2e
je 0x140055272
cmp edx, 0x34616d69
jne 0x14005599b
cmp r8d, 0x20
ja 0x140055991
lea rcx, [r14 + 0x58]
mov r9d, r13d
lea r8, [0x14013f6a0]
mov edx, 2
call fcn.140025fb0
cmp dword [r14 + 0x408], 0
jne 0x140055254
imul eax, dword [r14 + 0x20], 0x22
mov dword [r14 + 0x408], eax
cmp dword [r14 + 0x418], 0
jne case.0x14005551b.5
mov dword [r14 + 0x418], 0x40
jmp case.0x14005551b.5
lea r8, [0x14012f208]
mov r9d, r13d
lea rcx, [r14 + 0x58]
mov edx, 2
call fcn.140025fb0
mov dword [r14 + 0x2c], 0x480
jmp case.0x14005551b.5
cmp r8d, 2
ja 0x140055991
lea rcx, [r14 + 0x58]
mov r9d, r13d
lea r8, [0x14013f6f4]
mov edx, 2
call fcn.140025fb0
jmp case.0x14005551b.5
sub edx, 0x6134706d
je 0x140055442
sub edx, 0x22cfbf4
je 0x140055401
sub edx, 0xa02040b
je 0x14005531d
sub edx, 0x9fdfbf5
je 0x140055314
cmp edx, 0x14
jne 0x14005599b
lea r8, [0x14012f280]
mov r9d, r13d
lea rcx, [r14 + 0x58]
mov edx, 2
call fcn.140025fb0
mov rcx, r14
call fcn.140023ca0
jmp case.0x14005551b.5
lea r8, [0x14012f288]
jmp 0x1400552f6
test r10b, 1
je 0x14005534b
cmp r9d, 0x40
jne 0x140055335
lea r8, [0x14012f270]
jmp 0x1400553d3
cmp r9d, 0x20
jne 0x14005599b
lea r8, [0x14012f260]
jmp 0x1400553d3
cmp r9d, 0x20
ja 0x14005599b
cmp r9d, 0x18
jbe 0x140055364
lea r8, [0x14012f1e8]
jmp 0x1400553d3
cmp r9d, 0x14
jbe 0x140055389
lea eax, [r8*4]
cmp r11d, eax
lea r8, [0x140130050]
lea rax, [0x14012f1d8]
cmovne r8, rax
jmp 0x1400553d3
cmp r9d, 0x10
jbe 0x1400553ae
lea eax, [r8*4]
cmp r11d, eax
lea r8, [0x140130060]
lea rax, [0x140130040]
cmovne r8, rax
jmp 0x1400553d3
cmp r9d, 0xc
jbe 0x1400553bd
lea r8, [0x14012f1c8]
jmp 0x1400553d3
cmp r9d, 8
lea r8, [0x140130030]
lea rax, [0x14012f1f8]
cmovbe r8, rax
lea rcx, [r14 + 0x58]
mov r9d, r13d
mov edx, 2
call fcn.140025fb0
mov eax, dword [rbp - 0x3d]
mov rcx, r14
shr eax, 1
not al
and al, 1
mov byte [r14 + 0x2c1], al
call fcn.140023ca0
jmp case.0x14005551b.5
lea rcx, [r14 + 0x58]
mov r9d, r13d
lea r8, [0x140130398]
mov edx, 2
call fcn.140025fb0
test dword [r14 + 0x428], 0xffffffef
jne 0x14005599b
cmp dword [r14 + 0x20], 2
ja 0x140055991
mov dword [r14 + 0x2c], 0x1000
jmp case.0x14005551b.5
lea rcx, [r14 + 0x58]
mov r9d, r13d
lea r8, [0x14012f250]
mov edx, 2
call fcn.140025fb0
mov ecx, dword [r14 + 0x20]
mov dword [r14 + 0x2c], 0x400
call fcn.14003ef20
mov dword [r14 + 0x24], eax
jmp case.0x14005551b.5
lea rax, [rcx + 4]
mov qword [r14 + 0x290], rax
test rsi, rsi
jns 0x1400554b2
mov rcx, qword [r14 + 0x70]
lea rdx, [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
mov rbx, r15
cmovne rbx, qword [rbp - 0x11]
mov rsi, rbx
sub rsi, qword [r14 + 0x290]
mov qword [r14 + 0x2d0], rsi
jmp case.0x14005551b.5
add rsi, 0xfffffffffffffffc
mov qword [r14 + 0x2d0], rsi
jmp case.0x14005551b.5
mov rcx, qword [r14 + 0x70]
lea r9, [rbp + 0x77]
mov r8d, recv
mov dword [rbp + 0x77], r15d
lea rdx, [rbp - 0x59]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rbp - 0x59]
mov r8d, dword [rbp - 0x55]
mov edx, dword [rbp - 0x51]
bswap eax
mov dword [rbp - 0x59], eax
bswap r8d
mov dword [rbp - 0x55], r8d
bswap edx
mov dword [rbp - 0x51], edx
cmp eax, 0x6c
ja case.0x14005551b.5
mov eax, eax
movzx eax, byte [rdi + rax + 0x55aa4]
mov ecx, dword [rdi + rax*4 + 0x55a8c]
add rcx, rdi
jmp rcx
mov dword [r14 + 0x24], 4
jmp case.0x14005551b.5
mov dword [r14 + 0x24], 3
jmp case.0x14005551b.5
mov dword [r14 + 0x24], gethostbyname
jmp case.0x14005551b.5
mov dword [r14 + 0x24], r8d
jmp case.0x14005551b.5
test edx, edx
je case.0x14005551b.5
mov ecx, edx
mov eax, socket
mul rcx
mov edi, r15d
mov ebx, r15d
cmovo rax, r13
mov rcx, rax
call fcn.1400b609c
mov rsi, rax
test rax, rax
je 0x1400555e7
mov ecx, dword [rbp - 0x51]
lea r9, [rbp + 0x6f]
mov rdx, rax
mov dword [rbp + 0x6f], r15d
mov qword [rsp + 0x20], r15
lea r8d, [rcx + rcx*4]
mov rcx, qword [r14 + 0x70]
shl r8d, 2
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r8d, dword [rbp - 0x51]
mov r12d, r15d
mov dword [rbp + 0x6f], r15d
test r8d, r8d
je 0x1400555df
nop
mov eax, r12d
lea rcx, [rax + rax*4]
mov edx, dword [rsi + rcx*4]
bswap edx
lea ecx, [rdx - 1]
cmp ecx, 0x11
ja 0x1400555db
cmp edx, ebx
jbe 0x1400555db
mov eax, 1
inc r12d
shl eax, cl
mov ebx, edx
or edi, eax
cmp r12d, r8d
jb 0x1400555b0
mov dword [rbp + 0x6f], r12d
mov rcx, rsi
call fcn.1400b60a4
mov rbx, qword [rbp + 0x7f]
cmp r12d, dword [rbp - 0x51]
jne 0x1400555f5
mov dword [r14 + 0x24], edi
lea rdi, [0x140000000]
jmp case.0x14005551b.5
cmp eax, 0x6f666e69
je 0x1400557f3
cmp eax, 0x746b6170
jne case.0x14005551b.5
mov rcx, qword [r14 + 0x70]
lea r9, [rbp + 0x77]
mov r8d, 0x18
mov dword [rbp + 0x77], r15d
lea rdx, [rbp - 0x49]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, qword [rbp - 0x41]
mov r8, qword [rbp - 0x49]
mov eax, dword [rbp - 0x39]
mov edx, dword [rbp - 0x35]
bswap rcx
mov qword [rbp - 0x41], rcx
bswap r8
mov qword [rbp - 0x49], r8
mov qword [r14 + 0x400], r8
bswap eax
mov dword [rbp - 0x39], eax
bswap edx
mov dword [rbp - 0x35], edx
test rcx, rcx
je 0x14005566e
mov qword [r14 + 0x18], rcx
test eax, eax
je 0x14005567b
cdqe
mov qword [r14 + 0x430], rax
test edx, edx
je 0x140055696
mov rcx, qword [r14 + 0x18]
test rcx, rcx
je 0x140055696
add rcx, qword [r14 + 0x430]
mov qword [r14 + 0x438], rcx
test r8, r8
je case.0x14005551b.5
mov ebx, dword [rbp - 0x1d]
add ebx, 0xffffffe8
je 0x140055048
movsxd rdi, ebx
mov rcx, rdi
call fcn.1400b609c
mov rcx, qword [r14 + 0x70]
lea r9, [rbp + 0x77]
mov r8d, ebx
mov dword [rbp + 0x77], r15d
mov rdx, rax
mov qword [rsp + 0x20], r15
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400559a5
cmp dword [rbp + 0x77], ebx
jne 0x1400559a5
cmp dword [r14 + 0x408], 0
jne 0x140055710
mov eax, 4
mul qword [r14 + 0x400]
cmovo rax, r13
mov rcx, rax
call fcn.1400b609c
mov qword [r14 + 0x410], rax
cmp dword [r14 + 0x418], 0
jne 0x140055739
mov eax, 4
mul qword [r14 + 0x400]
cmovo rax, r13
mov rcx, rax
call fcn.1400b609c
mov qword [r14 + 0x420], rax
cmp qword [r14 + 0x400], 0
lea r10, [rdi + rsi]
mov edi, r15d
mov r8, rsi
jle 0x1400557eb
mov rbx, r15
mov r11, qword [r14 + 0x410]
test r11, r11
je 0x140055795
mov r9d, r15d
cmp r8, r10
jae 0x140055791
nop dword [rax + rax]
movzx edx, byte [r8]
mov eax, r9d
shl eax, 7
mov ecx, edx
and ecx, 0x7f
inc r8
mov r9d, ecx
or r9d, eax
test dl, dl
jns 0x140055791
cmp r8, r10
jb 0x140055770
mov dword [r11 + rbx], r9d
mov r11, qword [r14 + 0x420]
test r11, r11
je 0x1400557d5
mov r9d, r15d
cmp r8, r10
jae 0x1400557d1
nop dword [rax]
movzx edx, byte [r8]
mov eax, r9d
shl eax, 7
mov ecx, edx
and ecx, 0x7f
inc r8
mov r9d, ecx
or r9d, eax
test dl, dl
jns 0x1400557d1
cmp r8, r10
jb 0x1400557b0
mov dword [r11 + rbx], r9d
inc edi
add rbx, 4
movsxd rax, edi
cmp rax, qword [r14 + 0x400]
jl 0x140055754
mov rcx, rsi
jmp 0x14005503c
mov rcx, qword [r14 + 0x70]
lea r9, [rbp + 0x77]
mov r8d, 4
mov dword [rbp + 0x77], r15d
lea rdx, [rbp + 0x67]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rbp + 0x67]
mov ebx, dword [rbp - 0x1d]
bswap ecx
add ebx, 0xfffffffc
mov dword [rbp + 0x67], ecx
test ecx, ecx
je 0x140055048
test ebx, ebx
je 0x140055048
lea eax, [rbx + rbx]
cmp ecx, eax
ja 0x140055048
lea eax, [rbx + 1]
movsxd rcx, eax
call fcn.1400b609c
mov rcx, qword [r14 + 0x70]
lea r9, [rbp + 0x77]
mov r8d, ebx
mov qword [rbp - 9], rax
mov rdx, rax
mov dword [rbp + 0x77], r15d
mov rdi, rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rsi, ebx
mov r13d, r15d
add rsi, rdi
mov rbx, rdi
mov qword [rbp + 0x77], rsi
mov byte [rsi], 0
mov ecx, dword [rbp + 0x67]
test ecx, ecx
je 0x14005597d
mov r9, qword [str.artist]
mov r12, rbx
cmp rbx, rsi
jae 0x1400558af
nop dword [rax]
movzx eax, byte [rbx]
inc rbx
test al, al
je 0x1400558af
cmp rbx, rsi
jb 0x1400558a0
mov r15, rbx
cmp rbx, rsi
jae 0x1400558cf
nop word [rax + rax]
movzx eax, byte [rbx]
inc rbx
test al, al
je 0x1400558cf
cmp rbx, rsi
jb 0x1400558c0
cmp byte [r12], 0
je 0x140055966
cmp byte [r15], 0
je 0x140055966
xor eax, eax
mov edi, eax
test r9, r9
je 0x140055966
mov edx, eax
lea rsi, [0x140000000]
nop word [rax + rax]
mov rax, r12
sub r9, r12
nop word [rax + rax]
movzx r8d, byte [rax]
movzx ecx, byte [rax + r9]
sub r8d, ecx
jne 0x140055925
inc rax
test ecx, ecx
jne 0x140055910
test r8d, r8d
jne 0x140055941
mov edx, dword [rdx + rsi + 0x140ec8]
lea r9d, [r8 - 1]
mov r8, r15
lea rcx, [r14 + 0x58]
call fcn.1400260d0
inc rdi
mov rdx, rdi
shl rdx, 4
mov r9, qword [rdx + rsi + 0x140ec0]
test r9, r9
jne 0x140055900
mov r9, qword [str.artist]
mov ecx, dword [rbp + 0x67]
mov rsi, qword [rbp + 0x77]
inc r13d
cmp r13d, ecx
jb 0x140055891
mov rdi, qword [rbp - 9]
xor r15d, r15d
mov r12d, dword [rbp + 0x6f]
mov rcx, rdi
call fcn.1400b60a4
mov r13, 0xffffffffffffffff
jmp 0x140055041
mov eax, 0x80040209
jmp 0x140055a54
mov eax, 0x8004020b
jmp 0x140055a54
mov rcx, rsi
call fcn.1400b60a4
mov eax, 0x80040205
jmp 0x140055a54
mov r8, qword [r14 + 0x400]
test r8, r8
je 0x1400559fa
mov rdx, qword [r14 + 0x420]
test rdx, rdx
je 0x1400559fa
test r8, r8
jle 0x140055a29
mov rcx, r15
nop word [rax + rax]
mov eax, dword [rdx]
lea rdx, [rdx + 4]
add rcx, rax
inc r15d
movsxd rax, r15d
mov qword [r14 + 0x18], rcx
cmp rax, r8
jl 0x1400559e0
jmp 0x140055a29
mov ecx, dword [r14 + 0x428]
test ecx, ecx
je 0x140055a3d
imul ecx, dword [r14 + 0x20]
mov rax, qword [r14 + 0x2d0]
shl rax, 3
cqo
idiv rcx
mov rcx, rax
test r8, r8
jne 0x140055a29
mov qword [r14 + 0x400], rax
test rcx, rcx
je 0x140055a3d
sub rcx, qword [r14 + 0x430]
mov qword [r14 + 0x18], rcx
xor eax, eax
jmp 0x140055a54
movabs rax, 0x7fffffffffffffff
mov qword [r14 + 0x18], rax
xor eax, eax
jmp 0x140055a54
mov eax, 0x8004020d
mov r13, qword [rsp + 0xa8]
mov r12, qword [rsp + 0xb0]
mov rdi, qword [rsp + 0xb8]
mov rsi, qword [rsp + 0xc0]
movaps xmm6, xmmword [rsp + 0x90]
add rsp, 0xc8
pop r15
pop r14
pop rbx
pop rbp
ret