Function at 0x14007bfe5
Capabilities:
Get file size

Disassembly:
push rbp
push r12
push rdi
push rsi
push rbx
sub rsp, 0x50
lea rbp, [rsp + 0x50]
mov qword [rbp + 0x30], rcx
mov dword [rbp + 0x38], edx
mov dword [rbp + 0x40], r8d
mov dword [rbp + 0x48], r9d
mov rax, qword [0x140769160]
test rax, rax
jne 0x14007c025
mov edx, 0
mov ecx, 0
call fcn.1400437be
mov qword [0x140769160], rax
mov edx, 1
lea rax, [0x1401a3c64]
mov rcx, rax
call fcn.140043595
mov rdx, rax
mov rax, qword [rbp + 0x30]
mov rcx, rax
call fcn.1400442e7
mov rdx, rax
mov rax, qword [0x140769160]
mov rcx, rax
call fcn.14004398c
call fcn.14007ac1d
mov dword [0x14076914c], eax
mov rdx, qword [0x140207e90]
mov eax, dword [0x14076914c]
cdqe
imul rax, rax, 0x88
add rax, rdx
mov qword [0x140769168], rax
mov rax, qword [rbp + 0x30]
mov rax, qword [rax]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, byte [rax]
movzx eax, al
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0x53
je 0x14007c0ad
cmp dword [rbp - 0xc], 0x73
jne 0x14007c138
add qword [rbp - 8], 1
mov rax, qword [rbp - 8]
movzx eax, byte [rax]
movzx eax, al
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0x43
je 0x14007c0cb
cmp dword [rbp - 0xc], 0x63
jne 0x14007c138
add qword [rbp - 8], 1
mov rax, qword [rbp - 8]
movzx eax, byte [rax]
movzx eax, al
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0x52
je 0x14007c0e9
cmp dword [rbp - 0xc], 0x72
jne 0x14007c138
add qword [rbp - 8], 1
mov rax, qword [rbp - 8]
movzx eax, byte [rax]
movzx eax, al
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0x4e
je 0x14007c107
cmp dword [rbp - 0xc], 0x6e
jne 0x14007c138
add qword [rbp - 8], 1
mov rax, qword [rbp - 8]
movzx eax, byte [rax]
movzx eax, al
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0x3a
jne 0x14007c138
mov rax, qword [0x140769168]
mov byte [rax + 0x80], 1
mov eax, dword [0x14076914c]
jmp 0x14007ca63
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x14007c14d
mov rax, qword [0x140769168]
mov byte [rax + 9], 1
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x14007c162
mov rax, qword [0x140769168]
mov byte [rax + 0xa], 1
mov eax, dword [rbp + 0x40]
and eax, 1
test eax, eax
je 0x14007c177
mov rax, qword [0x140769168]
mov byte [rax + 0xb], 1
mov eax, dword [rbp + 0x40]
and eax, 2
test eax, eax
je 0x14007c18c
mov rax, qword [0x140769168]
mov byte [rax + 0xc], 1
mov rax, qword [0x140769168]
mov qword [rax + 0x10], 0
mov rdx, qword [0x140769168]
mov rax, qword [0x140769160]
mov rcx, rax
call fcn.14007b270
mov dword [0x140769150], eax
mov eax, dword [0x140769150]
test eax, eax
setne al
test al, al
je 0x14007c1e8
mov eax, dword [0x140769150]
cmp eax, 0xffffffff
jne 0x14007c1e8
mov eax, dword [0x14076914c]
mov ecx, eax
call fcn.14007af4c
mov eax, 0xfffffff5
jmp 0x14007ca63
mov rdx, qword [0x140207e88]
mov eax, dword [0x14076914c]
cdqe
shl rax, 3
add rax, rdx
mov qword [0x140769170], rax
mov dword [0x140769150], 0
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x14007c22a
mov eax, dword [0x140769150]
or eax, 0x80000000
mov dword [0x140769150], eax
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x14007c245
mov eax, dword [0x140769150]
or eax, 0x40000000
mov dword [0x140769150], eax
mov dword [0x140769154], 3
mov eax, dword [rbp + 0x40]
and eax, 1
test eax, eax
je 0x14007c268
mov eax, dword [0x140769154]
xor eax, 1
mov dword [0x140769154], eax
mov eax, dword [rbp + 0x40]
and eax, 2
test eax, eax
je 0x14007c281
mov eax, dword [0x140769154]
xor eax, 2
mov dword [0x140769154], eax
mov rax, qword [0x140769168]
movzx eax, byte [rax + 0x60]
test al, al
je 0x14007c6fb
mov rax, qword [0x140769178]
test rax, rax
jne 0x14007c2b6
mov edx, 0
mov ecx, 0
call fcn.1400437be
mov qword [0x140769178], rax
mov rax, qword [0x140769168]
movzx eax, byte [rax + 0x60]
movzx eax, al
mov ecx, eax
call fcn.140046568
mov rbx, rax
lea rax, [0x1401a4453]
mov rcx, rax
call fcn.1400434d7
mov rdx, rbx
mov rcx, rax
call fcn.1400442e7
mov rdx, rax
mov rax, qword [0x140769178]
mov rcx, rax
call fcn.14004398c
mov edx, 2
lea rax, [0x1401a4456]
mov rcx, rax
call fcn.140043595
mov rdx, rax
mov rax, qword [0x140769178]
mov rcx, rax
call fcn.1400442e7
mov rdx, rax
mov rax, qword [0x140769178]
mov rcx, rax
call fcn.14004398c
mov rax, qword [0x140769178]
mov rax, qword [rax]
add rax, 2
mov byte [rax], 0x4d
mov eax, dword [0x140769150]
mov edx, eax
mov rax, qword [0x140769178]
mov rax, qword [rax]
mov rbx, qword [0x140769170]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbx], rax
mov rax, qword [0x140769170]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x14007c3b7
mov eax, dword [0x14076914c]
mov ecx, eax
call fcn.14007af4c
mov eax, 0xfffffff8
jmp 0x14007ca63
mov r8d, 0x1c
mov edx, 0
lea rax, [0x140769180]
mov rcx, rax
call sub.msvcrt.dll_memset
mov dword [0x140769180], 0x1c
mov rax, qword [0x140769170]
mov rax, qword [rax]
lea rdx, [0x140769180]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCommState]
call rax
test eax, eax
sete al
test al, al
je 0x14007c42e
mov rax, qword [0x140769170]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x14076914c]
mov ecx, eax
call fcn.14007af4c
mov eax, 0xfffffff8
jmp 0x14007ca63
mov r8d, 0x14
mov edx, 0
lea rax, [0x1407691a0]
mov rcx, rax
call sub.msvcrt.dll_memset
mov rax, qword [0x140769168]
mov eax, dword [rax + 0x64]
mov dword [0x140769184], eax
mov rax, qword [0x140769168]
movzx eax, byte [rax + 0x6a]
movsx eax, al
mov dword [0x140769150], eax
mov eax, dword [0x140769150]
cmp eax, 0xa
jne 0x14007c481
mov dword [0x140769154], 0
mov eax, dword [0x140769150]
cmp eax, 0xf
jne 0x14007c496
mov dword [0x140769154], 1
mov eax, dword [0x140769150]
cmp eax, 0x14
jne 0x14007c4ab
mov dword [0x140769154], 2
mov eax, dword [0x140769154]
mov byte [0x140769194], al
mov rax, qword [0x140769168]
movzx eax, byte [rax + 0x69]
mov byte [0x140769192], al
mov rax, qword [0x140769168]
movzx eax, byte [rax + 0x68]
movsx eax, al
mov dword [0x140769150], eax
mov eax, dword [0x140769150]
test eax, eax
jne 0x14007c4f0
mov dword [0x140769154], 0
mov eax, dword [0x140769150]
cmp eax, 1
jne 0x14007c505
mov dword [0x140769154], 2
mov eax, dword [0x140769150]
cmp eax, 2
jne 0x14007c51a
mov dword [0x140769154], 1
mov eax, dword [0x140769150]
cmp eax, 3
jne 0x14007c52f
mov dword [0x140769154], 4
mov eax, dword [0x140769150]
cmp eax, 4
jne 0x14007c544
mov dword [0x140769154], 3
mov eax, dword [0x140769154]
mov byte [0x140769193], al
mov eax, dword [0x140769154]
test eax, eax
jne 0x14007c56c
movzx eax, byte [0x140769188]
and eax, 0xfffffffd
mov byte [0x140769188], al
jmp 0x14007c57c
movzx eax, byte [0x140769188]
or eax, 2
mov byte [0x140769188], al
mov rax, qword [0x140769168]
movzx eax, byte [rax + 0x6d]
test al, al
je 0x14007c59b
movzx eax, byte [0x140769189]
and eax, 0xffffffcf
mov byte [0x140769189], al
mov rax, qword [0x140769168]
movzx eax, byte [rax + 0x6b]
test al, al
jne 0x14007c5bc
movzx eax, byte [0x140769188]
or eax, 1
mov byte [0x140769188], al
jmp 0x14007c5cc
movzx eax, byte [0x140769188]
and eax, 0xfffffffe
mov byte [0x140769188], al
mov byte [0x140769198], 0x1a
mov rax, qword [0x140769170]
mov rax, qword [rax]
lea rdx, [0x140769180]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetCommState]
call rax
test eax, eax
sete al
test al, al
je 0x14007c626
mov rax, qword [0x140769170]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x14076914c]
mov ecx, eax
call fcn.14007af4c
mov eax, 0xfffffff8
jmp 0x14007ca63
mov rax, qword [0x140769168]
mov eax, dword [rax + 0x78]
test eax, eax
jne 0x14007c654
mov dword [0x1407691a0], 0xffffffff
mov dword [0x1407691a4], 0
mov dword [0x1407691a8], 0
jmp 0x14007c678
mov dword [0x1407691a0], 0
mov dword [0x1407691a4], 0
mov rax, qword [0x140769168]
mov eax, dword [rax + 0x78]
mov dword [0x1407691a8], eax
mov dword [0x1407691ac], 0
mov rax, qword [0x140769168]
mov eax, dword [rax + 0x74]
mov dword [0x1407691b0], eax
mov rax, qword [0x140769170]
mov rax, qword [rax]
lea rdx, [0x1407691a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
call rax
test eax, eax
sete al
test al, al
je 0x14007c6e5
mov rax, qword [0x140769170]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x14076914c]
mov ecx, eax
call fcn.14007af4c
mov eax, 0xfffffff8
jmp 0x14007ca63
mov rax, qword [0x140769168]
mov byte [rax + 8], 1
mov eax, dword [0x14076914c]
jmp 0x14007ca63
mov dword [0x140769158], 3
cmp dword [rbp + 0x48], 0
je 0x14007c717
mov dword [0x140769158], 4
jmp 0x14007c718
nop
mov eax, dword [0x140769158]
mov edi, eax
mov eax, dword [0x140769154]
mov r12d, eax
mov eax, dword [0x140769150]
mov esi, eax
mov rax, qword [0x140769160]
mov rcx, rax
call fcn.14009ff40
mov rbx, qword [0x140769170]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], edi
mov r9d, 0
mov r8d, r12d
mov edx, esi
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbx], rax
mov rax, qword [0x140769170]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x14007c8b9
cmp dword [rbp + 0x48], 3
jne 0x14007c7b9
mov dword [0x140769150], 0x80000000
mov rax, qword [0x140769168]
mov byte [rax + 9], 1
mov rax, qword [0x140769168]
mov byte [rax + 0xa], 0
add dword [rbp + 0x48], 1
jmp 0x14007c718
cmp dword [rbp + 0x48], 4
jne 0x14007c7e8
mov dword [0x140769150], 0x40000000
mov rax, qword [0x140769168]
mov byte [rax + 9], 0
mov rax, qword [0x140769168]
mov byte [rax + 0xa], 1
add dword [rbp + 0x48], 1
jmp 0x14007c718
mov eax, dword [0x14076914c]
mov ecx, eax
call fcn.14007af4c
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [0x14076915c], eax
mov eax, dword [0x14076915c]
cmp eax, 3
jne 0x14007c819
mov eax, 0xfffffffa
jmp 0x14007ca63
mov eax, dword [0x14076915c]
cmp eax, 4
je 0x14007c83a
mov eax, dword [0x14076915c]
cmp eax, 0x1d
je 0x14007c83a
mov eax, dword [0x14076915c]
cmp eax, 0x1e
jne 0x14007c844
mov eax, 0xfffffff7
jmp 0x14007ca63
mov eax, dword [0x14076915c]
cmp eax, 5
je 0x14007c870
mov eax, dword [0x14076915c]
cmp eax, 0x13
je 0x14007c870
mov eax, dword [0x14076915c]
cmp eax, 0x21
je 0x14007c870
mov eax, dword [0x14076915c]
cmp eax, 0x20
jne 0x14007c87a
mov eax, 0xfffffff9
jmp 0x14007ca63
mov eax, dword [0x14076915c]
cmp eax, 0xf
je 0x14007c890
mov eax, dword [0x14076915c]
cmp eax, 0x15
jne 0x14007c89a
mov eax, 0xfffffff8
jmp 0x14007ca63
mov eax, dword [0x14076915c]
cmp eax, 2
jne 0x14007c8af
mov eax, 0xfffffffb
jmp 0x14007ca63
mov eax, 0xfffffffb
jmp 0x14007ca63
cmp dword [rbp + 0x48], 2
jne 0x14007ca52
mov rax, qword [0x140769170]
mov rax, qword [rax]
lea rdx, [0x1407691b8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileSize]
call rax
mov dword [0x1407691b4], eax
mov eax, dword [0x1407691b4]
test eax, eax
jne 0x14007c8fe
mov eax, dword [0x1407691b8]
test eax, eax
je 0x14007ca52
mov rax, qword [0x140769170]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov dword [0x140769158], 5
mov eax, dword [0x140769158]
mov edi, eax
mov eax, dword [0x140769154]
mov r12d, eax
mov eax, dword [0x140769150]
mov esi, eax
mov rax, qword [0x140769160]
mov rcx, rax
call fcn.14009ff40
mov rbx, qword [0x140769170]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], edi
mov r9d, 0
mov r8d, r12d
mov edx, esi
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbx], rax
mov rax, qword [0x140769170]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x14007ca52
mov eax, dword [0x14076914c]
mov ecx, eax
call fcn.14007af4c
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [0x14076915c], eax
mov eax, dword [0x14076915c]
cmp eax, 3
jne 0x14007c9c1
mov eax, 0xfffffffa
jmp 0x14007ca63
mov eax, dword [0x14076915c]
cmp eax, 4
je 0x14007c9e2
mov eax, dword [0x14076915c]
cmp eax, 0x1d
je 0x14007c9e2
mov eax, dword [0x14076915c]
cmp eax, 0x1e
jne 0x14007c9e9
mov eax, 0xfffffff7
jmp 0x14007ca63
mov eax, dword [0x14076915c]
cmp eax, 5
je 0x14007ca15
mov eax, dword [0x14076915c]
cmp eax, 0x13
je 0x14007ca15
mov eax, dword [0x14076915c]
cmp eax, 0x21
je 0x14007ca15
mov eax, dword [0x14076915c]
cmp eax, 0x20
jne 0x14007ca1c
mov eax, 0xfffffff9
jmp 0x14007ca63
mov eax, dword [0x14076915c]
cmp eax, 0xf
je 0x14007ca32
mov eax, dword [0x14076915c]
cmp eax, 0x15
jne 0x14007ca39
mov eax, 0xfffffff8
jmp 0x14007ca63
mov eax, dword [0x14076915c]
cmp eax, 2
jne 0x14007ca4b
mov eax, 0xfffffffb
jmp 0x14007ca63
mov eax, 0xfffffffb
jmp 0x14007ca63
mov rax, qword [0x140769168]
mov byte [rax + 8], 1
mov eax, dword [0x14076914c]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop r12
pop rbp
ret