Function at 0x47f9d3
Capabilities:
Get file size

Disassembly:
push rbp
push r12
push rdi
push rsi
push rbx
mov rbp, rsp
sub 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 [0x00c85660]
test rax, rax
jne 0x47fa11
mov edx, 0
mov ecx, 0
call fcn.00446b22
mov qword [0x00c85660], rax
mov edx, 1
lea rcx, [0x005b5d1c]
call fcn.004468f9
mov rdx, rax
mov rcx, qword [rbp + 0x30]
call fcn.0044764d
mov rdx, rax
mov rax, qword [0x00c85660]
mov rcx, rax
call fcn.00446cf0
call fcn.0047e61b
mov dword [0x00c8564c], eax
mov rdx, qword [0x007240d0]
mov eax, dword [0x00c8564c]
cdqe
imul rax, rax, 0x88
add rax, rdx
mov qword [0x00c85668], 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 0x47fa93
cmp dword [rbp - 0xc], 0x73
jne 0x47fb1e
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 0x47fab1
cmp dword [rbp - 0xc], 0x63
jne 0x47fb1e
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 0x47facf
cmp dword [rbp - 0xc], 0x72
jne 0x47fb1e
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 0x47faed
cmp dword [rbp - 0xc], 0x6e
jne 0x47fb1e
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 0x47fb1e
mov rax, qword [0x00c85668]
mov byte [rax + 0x80], 1
mov eax, dword [0x00c8564c]
jmp 0x48043d
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x47fb33
mov rax, qword [0x00c85668]
mov byte [rax + 9], 1
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x47fb48
mov rax, qword [0x00c85668]
mov byte [rax + 0xa], 1
mov eax, dword [rbp + 0x40]
and eax, 1
test eax, eax
je 0x47fb5d
mov rax, qword [0x00c85668]
mov byte [rax + 0xb], 1
mov eax, dword [rbp + 0x40]
and eax, 2
test eax, eax
je 0x47fb72
mov rax, qword [0x00c85668]
mov byte [rax + 0xc], 1
mov rax, qword [0x00c85668]
mov qword [rax + 0x10], 0
mov rdx, qword [0x00c85668]
mov rax, qword [0x00c85660]
mov rcx, rax
call fcn.0047ec63
mov dword [0x00c85650], eax
mov eax, dword [0x00c85650]
test eax, eax
setne al
test al, al
je 0x47fbce
mov eax, dword [0x00c85650]
cmp eax, 0xffffffff
jne 0x47fbce
mov eax, dword [0x00c8564c]
mov ecx, eax
call fcn.0047e943
mov eax, 0xfffffff5
jmp 0x48043d
mov rdx, qword [0x007240c8]
mov eax, dword [0x00c8564c]
cdqe
shl rax, 3
add rax, rdx
mov qword [0x00c85670], rax
mov dword [0x00c85650], 0
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x47fc10
mov eax, dword [0x00c85650]
or eax, 0x80000000
mov dword [0x00c85650], eax
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x47fc2b
mov eax, dword [0x00c85650]
or eax, 0x40000000
mov dword [0x00c85650], eax
mov dword [0x00c85654], 3
mov eax, dword [rbp + 0x40]
and eax, 1
test eax, eax
je 0x47fc4e
mov eax, dword [0x00c85654]
xor eax, 1
mov dword [0x00c85654], eax
mov eax, dword [rbp + 0x40]
and eax, 2
test eax, eax
je 0x47fc67
mov eax, dword [0x00c85654]
xor eax, 2
mov dword [0x00c85654], eax
mov rax, qword [0x00c85668]
movzx eax, byte [rax + 0x60]
test al, al
je 0x4800d5
mov rax, qword [0x00c85678]
test rax, rax
jne 0x47fc9c
mov edx, 0
mov ecx, 0
call fcn.00446b22
mov qword [0x00c85678], rax
mov rax, qword [0x00c85668]
movzx eax, byte [rax + 0x60]
movzx eax, al
mov ecx, eax
call fcn.004498d4
mov rbx, rax
lea rcx, [0x005b650d]
call fcn.0044683e
mov rdx, rbx
mov rcx, rax
call fcn.0044764d
mov rdx, rax
mov rax, qword [0x00c85678]
mov rcx, rax
call fcn.00446cf0
mov edx, 2
lea rcx, [0x005b6510]
call fcn.004468f9
mov rdx, rax
mov rax, qword [0x00c85678]
mov rcx, rax
call fcn.0044764d
mov rdx, rax
mov rax, qword [0x00c85678]
mov rcx, rax
call fcn.00446cf0
mov rax, qword [0x00c85678]
mov rax, qword [rax]
add rax, 2
mov byte [rax], 0x4d
mov eax, dword [0x00c85650]
mov edx, eax
mov rax, qword [0x00c85678]
mov rax, qword [rax]
mov rbx, qword [0x00c85670]
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 [0x00c85670]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x47fd97
mov eax, dword [0x00c8564c]
mov ecx, eax
call fcn.0047e943
mov eax, 0xfffffff8
jmp 0x48043d
mov r8d, 0x1c
mov edx, 0
lea rcx, [0x00c85680]
call sub.msvcrt.dll_memset
mov dword [0x00c85680], 0x1c
mov rax, qword [0x00c85670]
mov rax, qword [rax]
lea rdx, [0x00c85680]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCommState]
call rax
test eax, eax
sete al
test al, al
je 0x47fe0b
mov rax, qword [0x00c85670]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x00c8564c]
mov ecx, eax
call fcn.0047e943
mov eax, 0xfffffff8
jmp 0x48043d
mov r8d, 0x14
mov edx, 0
lea rcx, [0x00c856a0]
call sub.msvcrt.dll_memset
mov rax, qword [0x00c85668]
mov eax, dword [rax + 0x64]
mov dword [0x00c85684], eax
mov rax, qword [0x00c85668]
movzx eax, byte [rax + 0x6a]
movsx eax, al
mov dword [0x00c85650], eax
mov eax, dword [0x00c85650]
cmp eax, 0xa
jne 0x47fe5b
mov dword [0x00c85654], 0
mov eax, dword [0x00c85650]
cmp eax, 0xf
jne 0x47fe70
mov dword [0x00c85654], 1
mov eax, dword [0x00c85650]
cmp eax, 0x14
jne 0x47fe85
mov dword [0x00c85654], 2
mov eax, dword [0x00c85654]
mov byte [0x00c85694], al
mov rax, qword [0x00c85668]
movzx eax, byte [rax + 0x69]
mov byte [0x00c85692], al
mov rax, qword [0x00c85668]
movzx eax, byte [rax + 0x68]
movsx eax, al
mov dword [0x00c85650], eax
mov eax, dword [0x00c85650]
test eax, eax
jne 0x47feca
mov dword [0x00c85654], 0
mov eax, dword [0x00c85650]
cmp eax, 1
jne 0x47fedf
mov dword [0x00c85654], 2
mov eax, dword [0x00c85650]
cmp eax, 2
jne 0x47fef4
mov dword [0x00c85654], 1
mov eax, dword [0x00c85650]
cmp eax, 3
jne 0x47ff09
mov dword [0x00c85654], 4
mov eax, dword [0x00c85650]
cmp eax, 4
jne 0x47ff1e
mov dword [0x00c85654], 3
mov eax, dword [0x00c85654]
mov byte [0x00c85693], al
mov eax, dword [0x00c85654]
test eax, eax
jne 0x47ff46
movzx eax, byte [0x00c85688]
and eax, 0xfffffffd
mov byte [0x00c85688], al
jmp 0x47ff56
movzx eax, byte [0x00c85688]
or eax, 2
mov byte [0x00c85688], al
mov rax, qword [0x00c85668]
movzx eax, byte [rax + 0x6d]
test al, al
je 0x47ff75
movzx eax, byte [0x00c85689]
and eax, 0xffffffcf
mov byte [0x00c85689], al
mov rax, qword [0x00c85668]
movzx eax, byte [rax + 0x6b]
test al, al
jne 0x47ff96
movzx eax, byte [0x00c85688]
or eax, 1
mov byte [0x00c85688], al
jmp 0x47ffa6
movzx eax, byte [0x00c85688]
and eax, 0xfffffffe
mov byte [0x00c85688], al
mov byte [0x00c85698], 0x1a
mov rax, qword [0x00c85670]
mov rax, qword [rax]
lea rdx, [0x00c85680]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetCommState]
call rax
test eax, eax
sete al
test al, al
je 0x480000
mov rax, qword [0x00c85670]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x00c8564c]
mov ecx, eax
call fcn.0047e943
mov eax, 0xfffffff8
jmp 0x48043d
mov rax, qword [0x00c85668]
mov eax, dword [rax + 0x78]
test eax, eax
jne 0x48002e
mov dword [0x00c856a0], 0xffffffff
mov dword [0x00c856a4], 0
mov dword [0x00c856a8], 0
jmp 0x480052
mov dword [0x00c856a0], 0
mov dword [0x00c856a4], 0
mov rax, qword [0x00c85668]
mov eax, dword [rax + 0x78]
mov dword [0x00c856a8], eax
mov dword [0x00c856ac], 0
mov rax, qword [0x00c85668]
mov eax, dword [rax + 0x74]
mov dword [0x00c856b0], eax
mov rax, qword [0x00c85670]
mov rax, qword [rax]
lea rdx, [0x00c856a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
call rax
test eax, eax
sete al
test al, al
je 0x4800bf
mov rax, qword [0x00c85670]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x00c8564c]
mov ecx, eax
call fcn.0047e943
mov eax, 0xfffffff8
jmp 0x48043d
mov rax, qword [0x00c85668]
mov byte [rax + 8], 1
mov eax, dword [0x00c8564c]
jmp 0x48043d
mov dword [0x00c85658], 3
cmp dword [rbp + 0x48], 0
je 0x4800f1
mov dword [0x00c85658], 4
jmp 0x4800f2
nop
mov eax, dword [0x00c85658]
mov edi, eax
mov eax, dword [0x00c85654]
mov r12d, eax
mov eax, dword [0x00c85650]
mov esi, eax
mov rax, qword [0x00c85660]
mov rcx, rax
call fcn.004399c5
mov rbx, qword [0x00c85670]
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 [0x00c85670]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x480293
cmp dword [rbp + 0x48], 3
jne 0x480193
mov dword [0x00c85650], 0x80000000
mov rax, qword [0x00c85668]
mov byte [rax + 9], 1
mov rax, qword [0x00c85668]
mov byte [rax + 0xa], 0
add dword [rbp + 0x48], 1
jmp 0x4800f2
cmp dword [rbp + 0x48], 4
jne 0x4801c2
mov dword [0x00c85650], 0x40000000
mov rax, qword [0x00c85668]
mov byte [rax + 9], 0
mov rax, qword [0x00c85668]
mov byte [rax + 0xa], 1
add dword [rbp + 0x48], 1
jmp 0x4800f2
mov eax, dword [0x00c8564c]
mov ecx, eax
call fcn.0047e943
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [0x00c8565c], eax
mov eax, dword [0x00c8565c]
cmp eax, 3
jne 0x4801f3
mov eax, 0xfffffffa
jmp 0x48043d
mov eax, dword [0x00c8565c]
cmp eax, 4
je 0x480214
mov eax, dword [0x00c8565c]
cmp eax, 0x1d
je 0x480214
mov eax, dword [0x00c8565c]
cmp eax, 0x1e
jne 0x48021e
mov eax, 0xfffffff7
jmp 0x48043d
mov eax, dword [0x00c8565c]
cmp eax, 5
je 0x48024a
mov eax, dword [0x00c8565c]
cmp eax, 0x13
je 0x48024a
mov eax, dword [0x00c8565c]
cmp eax, 0x21
je 0x48024a
mov eax, dword [0x00c8565c]
cmp eax, 0x20
jne 0x480254
mov eax, 0xfffffff9
jmp 0x48043d
mov eax, dword [0x00c8565c]
cmp eax, 0xf
je 0x48026a
mov eax, dword [0x00c8565c]
cmp eax, 0x15
jne 0x480274
mov eax, 0xfffffff8
jmp 0x48043d
mov eax, dword [0x00c8565c]
cmp eax, 2
jne 0x480289
mov eax, 0xfffffffb
jmp 0x48043d
mov eax, 0xfffffffb
jmp 0x48043d
cmp dword [rbp + 0x48], 2
jne 0x48042c
mov rax, qword [0x00c85670]
mov rax, qword [rax]
lea rdx, [0x00c856b8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileSize]
call rax
mov dword [0x00c856b4], eax
mov eax, dword [0x00c856b4]
test eax, eax
jne 0x4802d8
mov eax, dword [0x00c856b8]
test eax, eax
je 0x48042c
mov rax, qword [0x00c85670]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov dword [0x00c85658], 5
mov eax, dword [0x00c85658]
mov edi, eax
mov eax, dword [0x00c85654]
mov r12d, eax
mov eax, dword [0x00c85650]
mov esi, eax
mov rax, qword [0x00c85660]
mov rcx, rax
call fcn.004399c5
mov rbx, qword [0x00c85670]
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 [0x00c85670]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x48042c
mov eax, dword [0x00c8564c]
mov ecx, eax
call fcn.0047e943
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [0x00c8565c], eax
mov eax, dword [0x00c8565c]
cmp eax, 3
jne 0x48039b
mov eax, 0xfffffffa
jmp 0x48043d
mov eax, dword [0x00c8565c]
cmp eax, 4
je 0x4803bc
mov eax, dword [0x00c8565c]
cmp eax, 0x1d
je 0x4803bc
mov eax, dword [0x00c8565c]
cmp eax, 0x1e
jne 0x4803c3
mov eax, 0xfffffff7
jmp 0x48043d
mov eax, dword [0x00c8565c]
cmp eax, 5
je 0x4803ef
mov eax, dword [0x00c8565c]
cmp eax, 0x13
je 0x4803ef
mov eax, dword [0x00c8565c]
cmp eax, 0x21
je 0x4803ef
mov eax, dword [0x00c8565c]
cmp eax, 0x20
jne 0x4803f6
mov eax, 0xfffffff9
jmp 0x48043d
mov eax, dword [0x00c8565c]
cmp eax, 0xf
je 0x48040c
mov eax, dword [0x00c8565c]
cmp eax, 0x15
jne 0x480413
mov eax, 0xfffffff8
jmp 0x48043d
mov eax, dword [0x00c8565c]
cmp eax, 2
jne 0x480425
mov eax, 0xfffffffb
jmp 0x48043d
mov eax, 0xfffffffb
jmp 0x48043d
mov rax, qword [0x00c85668]
mov byte [rax + 8], 1
mov eax, dword [0x00c8564c]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop r12
pop rbp
ret