Function at 0x47f273
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 [0x00c84640]
test rax, rax
jne 0x47f2b1
mov edx, 0
mov ecx, 0
call fcn.004463c2
mov qword [0x00c84640], rax
mov edx, 1
lea rcx, [0x005b4c3c]
call fcn.00446199
mov rdx, rax
mov rcx, qword [rbp + 0x30]
call fcn.00446eed
mov rdx, rax
mov rax, qword [0x00c84640]
mov rcx, rax
call fcn.00446590
call fcn.0047debb
mov dword [0x00c8462c], eax
mov rdx, qword [0x007230b0]
mov eax, dword [0x00c8462c]
cdqe
imul rax, rax, 0x88
add rax, rdx
mov qword [0x00c84648], 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 0x47f333
cmp dword [rbp - 0xc], 0x73
jne 0x47f3be
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 0x47f351
cmp dword [rbp - 0xc], 0x63
jne 0x47f3be
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 0x47f36f
cmp dword [rbp - 0xc], 0x72
jne 0x47f3be
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 0x47f38d
cmp dword [rbp - 0xc], 0x6e
jne 0x47f3be
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 0x47f3be
mov rax, qword [0x00c84648]
mov byte [rax + 0x80], 1
mov eax, dword [0x00c8462c]
jmp 0x47fcdd
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x47f3d3
mov rax, qword [0x00c84648]
mov byte [rax + 9], 1
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x47f3e8
mov rax, qword [0x00c84648]
mov byte [rax + 0xa], 1
mov eax, dword [rbp + 0x40]
and eax, 1
test eax, eax
je 0x47f3fd
mov rax, qword [0x00c84648]
mov byte [rax + 0xb], 1
mov eax, dword [rbp + 0x40]
and eax, 2
test eax, eax
je 0x47f412
mov rax, qword [0x00c84648]
mov byte [rax + 0xc], 1
mov rax, qword [0x00c84648]
mov qword [rax + 0x10], 0
mov rdx, qword [0x00c84648]
mov rax, qword [0x00c84640]
mov rcx, rax
call fcn.0047e503
mov dword [0x00c84630], eax
mov eax, dword [0x00c84630]
test eax, eax
setne al
test al, al
je 0x47f46e
mov eax, dword [0x00c84630]
cmp eax, 0xffffffff
jne 0x47f46e
mov eax, dword [0x00c8462c]
mov ecx, eax
call fcn.0047e1e3
mov eax, 0xfffffff5
jmp 0x47fcdd
mov rdx, qword [0x007230a8]
mov eax, dword [0x00c8462c]
cdqe
shl rax, 3
add rax, rdx
mov qword [0x00c84650], rax
mov dword [0x00c84630], 0
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x47f4b0
mov eax, dword [0x00c84630]
or eax, 0x80000000
mov dword [0x00c84630], eax
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x47f4cb
mov eax, dword [0x00c84630]
or eax, 0x40000000
mov dword [0x00c84630], eax
mov dword [0x00c84634], 3
mov eax, dword [rbp + 0x40]
and eax, 1
test eax, eax
je 0x47f4ee
mov eax, dword [0x00c84634]
xor eax, 1
mov dword [0x00c84634], eax
mov eax, dword [rbp + 0x40]
and eax, 2
test eax, eax
je 0x47f507
mov eax, dword [0x00c84634]
xor eax, 2
mov dword [0x00c84634], eax
mov rax, qword [0x00c84648]
movzx eax, byte [rax + 0x60]
test al, al
je 0x47f975
mov rax, qword [0x00c84658]
test rax, rax
jne 0x47f53c
mov edx, 0
mov ecx, 0
call fcn.004463c2
mov qword [0x00c84658], rax
mov rax, qword [0x00c84648]
movzx eax, byte [rax + 0x60]
movzx eax, al
mov ecx, eax
call fcn.00449174
mov rbx, rax
lea rcx, [0x005b542d]
call fcn.004460de
mov rdx, rbx
mov rcx, rax
call fcn.00446eed
mov rdx, rax
mov rax, qword [0x00c84658]
mov rcx, rax
call fcn.00446590
mov edx, 2
lea rcx, [0x005b5430]
call fcn.00446199
mov rdx, rax
mov rax, qword [0x00c84658]
mov rcx, rax
call fcn.00446eed
mov rdx, rax
mov rax, qword [0x00c84658]
mov rcx, rax
call fcn.00446590
mov rax, qword [0x00c84658]
mov rax, qword [rax]
add rax, 2
mov byte [rax], 0x4d
mov eax, dword [0x00c84630]
mov edx, eax
mov rax, qword [0x00c84658]
mov rax, qword [rax]
mov rbx, qword [0x00c84650]
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 [0x00c84650]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x47f637
mov eax, dword [0x00c8462c]
mov ecx, eax
call fcn.0047e1e3
mov eax, 0xfffffff8
jmp 0x47fcdd
mov r8d, 0x1c
mov edx, 0
lea rcx, [0x00c84660]
call sub.msvcrt.dll_memset
mov dword [0x00c84660], 0x1c
mov rax, qword [0x00c84650]
mov rax, qword [rax]
lea rdx, [0x00c84660]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCommState]
call rax
test eax, eax
sete al
test al, al
je 0x47f6ab
mov rax, qword [0x00c84650]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x00c8462c]
mov ecx, eax
call fcn.0047e1e3
mov eax, 0xfffffff8
jmp 0x47fcdd
mov r8d, 0x14
mov edx, 0
lea rcx, [0x00c84680]
call sub.msvcrt.dll_memset
mov rax, qword [0x00c84648]
mov eax, dword [rax + 0x64]
mov dword [0x00c84664], eax
mov rax, qword [0x00c84648]
movzx eax, byte [rax + 0x6a]
movsx eax, al
mov dword [0x00c84630], eax
mov eax, dword [0x00c84630]
cmp eax, 0xa
jne 0x47f6fb
mov dword [0x00c84634], 0
mov eax, dword [0x00c84630]
cmp eax, 0xf
jne 0x47f710
mov dword [0x00c84634], 1
mov eax, dword [0x00c84630]
cmp eax, 0x14
jne 0x47f725
mov dword [0x00c84634], 2
mov eax, dword [0x00c84634]
mov byte [0x00c84674], al
mov rax, qword [0x00c84648]
movzx eax, byte [rax + 0x69]
mov byte [0x00c84672], al
mov rax, qword [0x00c84648]
movzx eax, byte [rax + 0x68]
movsx eax, al
mov dword [0x00c84630], eax
mov eax, dword [0x00c84630]
test eax, eax
jne 0x47f76a
mov dword [0x00c84634], 0
mov eax, dword [0x00c84630]
cmp eax, 1
jne 0x47f77f
mov dword [0x00c84634], 2
mov eax, dword [0x00c84630]
cmp eax, 2
jne 0x47f794
mov dword [0x00c84634], 1
mov eax, dword [0x00c84630]
cmp eax, 3
jne 0x47f7a9
mov dword [0x00c84634], 4
mov eax, dword [0x00c84630]
cmp eax, 4
jne 0x47f7be
mov dword [0x00c84634], 3
mov eax, dword [0x00c84634]
mov byte [0x00c84673], al
mov eax, dword [0x00c84634]
test eax, eax
jne 0x47f7e6
movzx eax, byte [0x00c84668]
and eax, 0xfffffffd
mov byte [0x00c84668], al
jmp 0x47f7f6
movzx eax, byte [0x00c84668]
or eax, 2
mov byte [0x00c84668], al
mov rax, qword [0x00c84648]
movzx eax, byte [rax + 0x6d]
test al, al
je 0x47f815
movzx eax, byte [0x00c84669]
and eax, 0xffffffcf
mov byte [0x00c84669], al
mov rax, qword [0x00c84648]
movzx eax, byte [rax + 0x6b]
test al, al
jne 0x47f836
movzx eax, byte [0x00c84668]
or eax, 1
mov byte [0x00c84668], al
jmp 0x47f846
movzx eax, byte [0x00c84668]
and eax, 0xfffffffe
mov byte [0x00c84668], al
mov byte [0x00c84678], 0x1a
mov rax, qword [0x00c84650]
mov rax, qword [rax]
lea rdx, [0x00c84660]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetCommState]
call rax
test eax, eax
sete al
test al, al
je 0x47f8a0
mov rax, qword [0x00c84650]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x00c8462c]
mov ecx, eax
call fcn.0047e1e3
mov eax, 0xfffffff8
jmp 0x47fcdd
mov rax, qword [0x00c84648]
mov eax, dword [rax + 0x78]
test eax, eax
jne 0x47f8ce
mov dword [0x00c84680], 0xffffffff
mov dword [0x00c84684], 0
mov dword [0x00c84688], 0
jmp 0x47f8f2
mov dword [0x00c84680], 0
mov dword [0x00c84684], 0
mov rax, qword [0x00c84648]
mov eax, dword [rax + 0x78]
mov dword [0x00c84688], eax
mov dword [0x00c8468c], 0
mov rax, qword [0x00c84648]
mov eax, dword [rax + 0x74]
mov dword [0x00c84690], eax
mov rax, qword [0x00c84650]
mov rax, qword [rax]
lea rdx, [0x00c84680]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
call rax
test eax, eax
sete al
test al, al
je 0x47f95f
mov rax, qword [0x00c84650]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x00c8462c]
mov ecx, eax
call fcn.0047e1e3
mov eax, 0xfffffff8
jmp 0x47fcdd
mov rax, qword [0x00c84648]
mov byte [rax + 8], 1
mov eax, dword [0x00c8462c]
jmp 0x47fcdd
mov dword [0x00c84638], 3
cmp dword [rbp + 0x48], 0
je 0x47f991
mov dword [0x00c84638], 4
jmp 0x47f992
nop
mov eax, dword [0x00c84638]
mov edi, eax
mov eax, dword [0x00c84634]
mov r12d, eax
mov eax, dword [0x00c84630]
mov esi, eax
mov rax, qword [0x00c84640]
mov rcx, rax
call fcn.00439265
mov rbx, qword [0x00c84650]
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 [0x00c84650]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x47fb33
cmp dword [rbp + 0x48], 3
jne 0x47fa33
mov dword [0x00c84630], 0x80000000
mov rax, qword [0x00c84648]
mov byte [rax + 9], 1
mov rax, qword [0x00c84648]
mov byte [rax + 0xa], 0
add dword [rbp + 0x48], 1
jmp 0x47f992
cmp dword [rbp + 0x48], 4
jne 0x47fa62
mov dword [0x00c84630], 0x40000000
mov rax, qword [0x00c84648]
mov byte [rax + 9], 0
mov rax, qword [0x00c84648]
mov byte [rax + 0xa], 1
add dword [rbp + 0x48], 1
jmp 0x47f992
mov eax, dword [0x00c8462c]
mov ecx, eax
call fcn.0047e1e3
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [0x00c8463c], eax
mov eax, dword [0x00c8463c]
cmp eax, 3
jne 0x47fa93
mov eax, 0xfffffffa
jmp 0x47fcdd
mov eax, dword [0x00c8463c]
cmp eax, 4
je 0x47fab4
mov eax, dword [0x00c8463c]
cmp eax, 0x1d
je 0x47fab4
mov eax, dword [0x00c8463c]
cmp eax, 0x1e
jne 0x47fabe
mov eax, 0xfffffff7
jmp 0x47fcdd
mov eax, dword [0x00c8463c]
cmp eax, 5
je 0x47faea
mov eax, dword [0x00c8463c]
cmp eax, 0x13
je 0x47faea
mov eax, dword [0x00c8463c]
cmp eax, 0x21
je 0x47faea
mov eax, dword [0x00c8463c]
cmp eax, 0x20
jne 0x47faf4
mov eax, 0xfffffff9
jmp 0x47fcdd
mov eax, dword [0x00c8463c]
cmp eax, 0xf
je 0x47fb0a
mov eax, dword [0x00c8463c]
cmp eax, 0x15
jne 0x47fb14
mov eax, 0xfffffff8
jmp 0x47fcdd
mov eax, dword [0x00c8463c]
cmp eax, 2
jne 0x47fb29
mov eax, 0xfffffffb
jmp 0x47fcdd
mov eax, 0xfffffffb
jmp 0x47fcdd
cmp dword [rbp + 0x48], 2
jne 0x47fccc
mov rax, qword [0x00c84650]
mov rax, qword [rax]
lea rdx, [0x00c84698]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileSize]
call rax
mov dword [0x00c84694], eax
mov eax, dword [0x00c84694]
test eax, eax
jne 0x47fb78
mov eax, dword [0x00c84698]
test eax, eax
je 0x47fccc
mov rax, qword [0x00c84650]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov dword [0x00c84638], 5
mov eax, dword [0x00c84638]
mov edi, eax
mov eax, dword [0x00c84634]
mov r12d, eax
mov eax, dword [0x00c84630]
mov esi, eax
mov rax, qword [0x00c84640]
mov rcx, rax
call fcn.00439265
mov rbx, qword [0x00c84650]
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 [0x00c84650]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x47fccc
mov eax, dword [0x00c8462c]
mov ecx, eax
call fcn.0047e1e3
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [0x00c8463c], eax
mov eax, dword [0x00c8463c]
cmp eax, 3
jne 0x47fc3b
mov eax, 0xfffffffa
jmp 0x47fcdd
mov eax, dword [0x00c8463c]
cmp eax, 4
je 0x47fc5c
mov eax, dword [0x00c8463c]
cmp eax, 0x1d
je 0x47fc5c
mov eax, dword [0x00c8463c]
cmp eax, 0x1e
jne 0x47fc63
mov eax, 0xfffffff7
jmp 0x47fcdd
mov eax, dword [0x00c8463c]
cmp eax, 5
je 0x47fc8f
mov eax, dword [0x00c8463c]
cmp eax, 0x13
je 0x47fc8f
mov eax, dword [0x00c8463c]
cmp eax, 0x21
je 0x47fc8f
mov eax, dword [0x00c8463c]
cmp eax, 0x20
jne 0x47fc96
mov eax, 0xfffffff9
jmp 0x47fcdd
mov eax, dword [0x00c8463c]
cmp eax, 0xf
je 0x47fcac
mov eax, dword [0x00c8463c]
cmp eax, 0x15
jne 0x47fcb3
mov eax, 0xfffffff8
jmp 0x47fcdd
mov eax, dword [0x00c8463c]
cmp eax, 2
jne 0x47fcc5
mov eax, 0xfffffffb
jmp 0x47fcdd
mov eax, 0xfffffffb
jmp 0x47fcdd
mov rax, qword [0x00c84648]
mov byte [rax + 8], 1
mov eax, dword [0x00c8462c]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop r12
pop rbp
ret