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

Disassembly:
push rbp
push rsi
push rdi
push r13
push r15
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
mov rdi, rcx
xor edx, edx
lea rcx, [rbp - 0x80]
mov r8d, 0x100
call fcn.1400ba240
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x1e0]
xor esi, esi
mov byte [rbp + 0x1d0], 0
mov r13d, recv
mov dword [rbp + 0x1e0], esi
mov r8d, r13d
mov qword [rsp + 0x20], rsi
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x70], 0x4d524f46
mov eax, dword [rsp + 0x74]
bswap eax
mov dword [rsp + 0x74], eax
jne 0x14004c236
mov eax, dword [rsp + 0x78]
cmp eax, 0x46464941
je 0x14004b90c
cmp eax, 0x43464941
jne 0x14004c236
mov rcx, qword [rdi + 0x70]
lea rdx, [rbp + 0x1e0]
mov qword [rsp + 0x298], rbx
mov qword [rsp + 0x290], r12
mov qword [rsp + 0x288], r14
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
mov r12, rsi
cmovne r12, qword [rbp + 0x1e0]
cmp r13, r12
jge 0x14004c22f
mov r14d, 0xffff
mov rcx, qword [rdi + 0x70]
xor r9d, r9d
xor r8d, r8d
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x1e0]
mov r8d, 8
mov dword [rbp + 0x1e0], esi
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r8d, dword [rsp + 0x34]
lea rbx, [r13 + 8]
bswap r8d
mov eax, 0xfffffffe
mov dword [rsp + 0x34], r8d
lea r13d, [r8 + 1]
and r13, rax
mov eax, dword [rsp + 0x30]
add r13, rbx
cmp eax, 0x4b52414d
ja 0x14004bc2b
je 0x14004bb11
cmp eax, 0x20296328
je 0x14004bab6
cmp eax, 0x20334449
je 0x14004baa2
cmp eax, 0x444e5353
je 0x14004ba43
cmp eax, 0x454d414e
jne 0x14004c170
test r8d, r8d
je 0x14004c170
mov ecx, r8d
call fcn.1400b609c
mov r8d, dword [rsp + 0x34]
lea r9, [rbp + 0x1e0]
mov rcx, qword [rdi + 0x70]
mov rdx, rax
mov rbx, rax
mov dword [rbp + 0x1e0], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r9d, dword [rsp + 0x34]
lea rcx, [rdi + 0x58]
mov r8, rbx
mov edx, 3
call fcn.140025fb0
mov rcx, rbx
call fcn.1400b60a4
jmp 0x14004c170
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x1e0]
mov r8d, 8
mov dword [rbp + 0x1e0], esi
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0x68]
mov eax, dword [rsp + 0x6c]
bswap eax
mov dword [rsp + 0x6c], eax
bswap ecx
mov ecx, ecx
mov dword [rsp + 0x68], ecx
lea rax, [rcx + 8]
add rax, rbx
mov qword [rdi + 0x290], rax
mov eax, dword [rsp + 0x34]
sub eax, ecx
sub eax, 8
mov dword [rdi + 0x2c8], eax
jmp 0x14004c170
mov r8, rdi
lea rcx, [rdi + 0x70]
mov rdx, rbx
call fcn.14005e120
jmp 0x14004c170
test r8d, r8d
je 0x14004c170
mov ecx, r8d
call fcn.1400b609c
mov r8d, dword [rsp + 0x34]
lea r9, [rbp + 0x1e0]
mov rcx, qword [rdi + 0x70]
mov rdx, rax
mov rbx, rax
mov dword [rbp + 0x1e0], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r9d, dword [rsp + 0x34]
lea rcx, [rdi + 0x58]
mov r8, rbx
mov edx, reloc.WSOCK32.dll_recv
call fcn.140025fb0
mov rcx, rbx
call fcn.1400b60a4
jmp 0x14004c170
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x1e0]
mov r8d, 2
mov dword [rbp + 0x1e0], esi
lea rdx, [rbp + 0x1d8]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [rbp + 0x1d8]
ror ax, 8
test ax, ax
je 0x14004bc1b
nop
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x1e0]
add ax, r14w
mov dword [rbp + 0x1e0], esi
mov r8d, 7
mov word [rbp + 0x1d8], ax
lea rdx, [rbp + 0x1e8]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rbp + 0x1ea]
lea r9, [rbp + 0x1e0]
movzx r8d, byte [rbp + 0x1ee]
lea rdx, [rbp + 0x80]
mov rcx, qword [rdi + 0x70]
ror word [rbp + 0x1e8], 8
bswap eax
mov dword [rbp + 0x1ea], eax
mov dword [rbp + 0x1e0], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx ecx, byte [rbp + 0x1ee]
mov byte [rbp + rcx + 0x80], 0
test cl, 1
jne 0x14004bbef
mov rcx, qword [rdi + 0x70]
mov r9d, 1
mov edx, r9d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
movzx eax, word [rbp + 0x1e8]
cmp eax, 0x40
jae 0x14004c170
mov ecx, eax
mov eax, dword [rbp + 0x1ea]
mov dword [rbp + rcx*4 - 0x80], eax
movzx eax, word [rbp + 0x1d8]
test ax, ax
jne 0x14004bb50
add ax, r14w
mov word [rbp + 0x1d8], ax
jmp 0x14004c170
cmp eax, 0x4d4d4f43
je 0x14004bd03
cmp eax, 0x4f4e4e41
je 0x14004bca8
cmp eax, 0x54534e49
jne 0x14004c170
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x1d0]
mov r8d, socket
mov dword [rbp + 0x1d0], esi
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
ror word [rsp + 0x40], 8
mov sil, 1
ror word [rsp + 0x42], 8
ror word [rsp + 0x44], 8
ror word [rsp + 0x46], 8
ror word [rsp + 0x48], 8
ror word [rsp + 0x4a], 8
ror word [rsp + 0x3e], 8
mov byte [rbp + 0x1d0], sil
jmp 0x14004c177
test r8d, r8d
je 0x14004c170
mov ecx, r8d
call fcn.1400b609c
mov r8d, dword [rsp + 0x34]
lea r9, [rbp + 0x1e0]
mov rcx, qword [rdi + 0x70]
mov rdx, rax
mov rbx, rax
mov dword [rbp + 0x1e0], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r9d, dword [rsp + 0x34]
lea rcx, [rdi + 0x58]
mov r8, rbx
mov edx, recv
call fcn.140025fb0
mov rcx, rbx
call fcn.1400b60a4
jmp 0x14004c170
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x1e0]
cmp r8d, 0x17
mov qword [rsp + 0x50], rsi
mov eax, reloc.WSOCK32.dll_socket
mov qword [rsp + 0x58], rsi
cmova r8d, eax
mov word [rsp + 0x60], si
lea rdx, [rsp + 0x50]
mov byte [rsp + 0x66], 0
mov dword [rsp + 0x62], 0x454e4f4e
mov dword [rbp + 0x1e0], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [rsp + 0x50]
lea rcx, [rsp + 0x58]
mov r14d, dword [rsp + 0x52]
movzx ebx, word [rsp + 0x56]
ror ax, 8
movzx esi, ax
bswap r14d
mov r14d, r14d
ror bx, 8
mov word [rsp + 0x50], si
mov dword [rsp + 0x52], r14d
mov word [rsp + 0x56], bx
mov qword [rdi + 0x18], r14
call fcn.14004d6b0
mov ecx, esi
mov dword [rdi + 0x28], eax
mov dword [rdi + 0x20], esi
call fcn.14004d670
mov dword [rdi + 0x24], eax
mov eax, dword [rsp + 0x62]
cmp eax, 0x36323747
ja 0x14004bf90
je 0x14004bf2f
cmp eax, 0x33323747
ja 0x14004be68
je 0x14004bf2f
cmp eax, 0x204d5347
je 0x14004be43
cmp eax, 0x31323747
je 0x14004bf2f
cmp eax, 0x32323747
je 0x14004be13
cmp eax, 0x32336c66
je 0x14004bec7
cmp eax, 0x32336e69
jne 0x14004c0c7
mov ebx, 0x20
mov word [rsp + 0x56], bx
lea rcx, [rdi + 0x58]
cmp bx, 0x18
jbe 0x14004c0f3
lea r8, [0x14012f1e8]
jmp 0x14004c136
cmp esi, 1
jne 0x14004c183
lea rcx, [rdi + 0x58]
lea r9d, [rsi - 2]
lea r8, [0x14013f6c0]
lea edx, [rsi + 1]
call fcn.140025fb0
mov eax, 4
mov dword [rdi + 0x2ac], eax
jmp 0x14004c16a
cmp esi, 1
jne 0x14004c183
lea rcx, [rdi + 0x58]
lea r9d, [rsi - 2]
lea r8, [0x14013f6e0]
lea edx, [rsi + 1]
call fcn.140025fb0
jmp 0x14004c16a
cmp eax, 0x3343414d
je 0x14004befc
cmp eax, 0x34326e69
je 0x14004c094
cmp eax, 0x34366c66
je 0x14004bec7
cmp eax, 0x34414d49
je 0x14004be97
cmp eax, 0x34616d69
jne 0x14004c0c7
cmp esi, 0x20
ja 0x14004c183
mov r9d, 0xffffffff
shl r14, 6
lea rcx, [rdi + 0x58]
mov qword [rdi + 0x18], r14
lea r8, [0x14013f6a0]
lea edx, [r9 + 3]
call fcn.140025fb0
jmp 0x14004c16a
cmp eax, 0x34366c66
lea r8, [0x14012f260]
mov edx, 2
lea rax, [0x14012f270]
cmove r8, rax
lea rcx, [rdi + 0x58]
lea r9d, [rdx - 3]
call fcn.140025fb0
mov byte [rdi + 0x2c1], 1
jmp 0x14004c162
cmp esi, 2
ja 0x14004c183
mov r9d, 0xffffffff
lea rax, [r14 + r14*2]
add rax, rax
lea rcx, [rdi + 0x58]
lea r8, [0x14013f6ec]
mov qword [rdi + 0x18], rax
lea edx, [r9 + 3]
call fcn.140025fb0
jmp 0x14004c16a
cmp esi, 1
jne 0x14004c183
cmp eax, 0x31323747
jne 0x14004bf44
lea eax, [rsi + 3]
jmp 0x14004bf61
cmp bx, 2
jae 0x14004bf56
mov ecx, 2
mov word [rsp + 0x56], cx
jmp 0x14004bf66
cmp bx, 5
jbe 0x14004bf66
mov eax, 5
mov word [rsp + 0x56], ax
mov r9d, 0xffffffff
lea rcx, [rdi + 0x58]
lea r8, [0x14013f6b0]
lea edx, [r9 + 3]
call fcn.140025fb0
movzx eax, word [rsp + 0x56]
mov dword [rdi + 0x2ac], eax
jmp 0x14004c16a
cmp eax, 0x656e6f6e
ja 0x14004c02f
je 0x14004c094
mov ecx, eax
sub ecx, 0x3643414d
je 0x14004bffc
sub ecx, 0x1eef5fa
je 0x14004bfca
sub ecx, 0xd1c1807
je 0x14004c094
sub ecx, 0x11f2fcf3
jmp 0x14004c04f
mov esi, 2
lea rcx, [rdi + 0x58]
mov edx, esi
lea r8, [0x14013f6d0]
mov r9d, 0xffffffff
call fcn.140025fb0
cmp dword [rdi + 0x20], 1
jne 0x14004c183
mov dword [rdi + 0x2ac], esi
jmp 0x14004c16a
cmp esi, 2
ja 0x14004c183
mov r9d, 0xffffffff
lea rax, [r14 + r14*2]
add rax, rax
lea rcx, [rdi + 0x58]
lea r8, [0x14013f6f4]
mov qword [rdi + 0x18], rax
lea edx, [r9 + 3]
call fcn.140025fb0
jmp 0x14004c16a
mov ecx, eax
sub ecx, 0x6d63706c
je 0x14004c094
sub ecx, 0x60c0708
je 0x14004c094
sub ecx, 0x107f7ff
je 0x14004c094
sub ecx, 0x2e9fcee
je 0x14004c075
cmp ecx, 0x14
jne 0x14004c0c7
mov r9d, 0xffffffff
lea rcx, [rdi + 0x58]
lea r8, [0x14012f280]
lea edx, [r9 + 3]
call fcn.140025fb0
jmp 0x14004c162
mov r9d, 0xffffffff
lea rcx, [rdi + 0x58]
lea r8, [0x14012f288]
lea edx, [r9 + 3]
call fcn.140025fb0
jmp 0x14004c162
cmp eax, 0x32336e69
je 0x14004bdef
cmp eax, 0x34326e69
jne 0x14004c0bd
mov eax, 0x18
lea rcx, [rdi + 0x58]
mov word [rsp + 0x56], ax
lea r8, [0x14012f1d8]
jmp 0x14004c136
cmp bx, 0x20
jbe 0x14004bdf9
mov eax, 0x8004020b
mov r12, qword [rsp + 0x290]
mov rbx, qword [rsp + 0x298]
mov r14, qword [rsp + 0x288]
add rsp, 0x2a0
pop r15
pop r13
pop rdi
pop rsi
pop rbp
ret
cmp bx, 0x14
jbe 0x14004c102
lea r8, [0x14012f1d8]
jmp 0x14004c136
cmp bx, 0x10
jbe 0x14004c111
lea r8, [0x140130040]
jmp 0x14004c136
cmp bx, 0xc
jbe 0x14004c120
lea r8, [0x14012f1c8]
jmp 0x14004c136
cmp bx, 8
lea r8, [0x140130030]
lea rax, [0x14012f1f8]
cmovbe r8, rax
mov edx, 2
lea r9d, [rdx - 3]
call fcn.140025fb0
mov eax, dword [rsp + 0x62]
cmp eax, 0x6d63706c
je 0x14004c15a
cmp eax, 0x74776f73
je 0x14004c15a
mov al, 1
jmp 0x14004c15c
xor al, al
mov byte [rdi + 0x2c1], al
mov rcx, rdi
call fcn.140023ca0
mov r14d, 0xffff
movzx esi, byte [rbp + 0x1d0]
cmp r13, r12
jge 0x14004c18d
xor esi, esi
jmp 0x14004b951
mov eax, 0x80040209
jmp 0x14004c0cc
test sil, sil
je 0x14004c22f
movzx eax, byte [rsp + 0x3a]
mov byte [rdi + 0x39], al
movzx eax, byte [rsp + 0x3b]
mov byte [rdi + 0x3a], al
movzx eax, byte [rsp + 0x3c]
mov byte [rdi + 0x3b], al
movzx eax, byte [rsp + 0x3d]
mov byte [rdi + 0x3c], al
movzx eax, byte [rsp + 0x38]
mov byte [rdi + 0x3d], al
movzx eax, byte [rsp + 0x39]
mov byte [rdi + 0x3e], al
movsx eax, word [rsp + 0x3e]
mov byte [rdi + 0x38], 1
movd xmm0, eax
movzx eax, word [rsp + 0x42]
cvtdq2ps xmm0, xmm0
movss dword [rdi + 0x40], xmm0
cmp eax, 0x40
jae 0x14004c1f0
mov ecx, dword [rbp + rax*4 - 0x80]
test ecx, ecx
je 0x14004c1f0
mov dword [rdi + 0x48], ecx
movzx eax, word [rsp + 0x44]
cmp eax, 0x40
jae 0x14004c205
mov ecx, dword [rbp + rax*4 - 0x80]
test ecx, ecx
je 0x14004c205
mov dword [rdi + 0x4c], ecx
cmp dword [rdi + 0x48], 0
je 0x14004c22f
movzx eax, word [rsp + 0x40]
test ax, ax
je 0x14004c22f
mov byte [rdi + 0x44], 1
cmp ax, 2
jne 0x14004c223
mov byte [rdi + 0x45], 1
cmp word [rsp + 0x46], 0
jne 0x14004c22f
mov byte [rdi + 0x46], 1
xor eax, eax
jmp 0x14004c0cc
mov eax, 0x8004020c
add rsp, 0x2a0
pop r15
pop r13
pop rdi
pop rsi
pop rbp
ret