Function at 0x47f193
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 [0x00c84620]
test rax, rax
jne 0x47f1d1
mov edx, 0
mov ecx, 0
call fcn.004462e2
mov qword [0x00c84620], rax
mov edx, 1
lea rcx, [0x005b4c3c]
call fcn.004460b9
mov rdx, rax
mov rcx, qword [rbp + 0x30]
call fcn.00446e0d
mov rdx, rax
mov rax, qword [0x00c84620]
mov rcx, rax
call fcn.004464b0
call fcn.0047dddb
mov dword [0x00c8460c], eax
mov rdx, qword [0x00723090]
mov eax, dword [0x00c8460c]
cdqe
imul rax, rax, 0x88
add rax, rdx
mov qword [0x00c84628], 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 0x47f253
cmp dword [rbp - 0xc], 0x73
jne 0x47f2de
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 0x47f271
cmp dword [rbp - 0xc], 0x63
jne 0x47f2de
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 0x47f28f
cmp dword [rbp - 0xc], 0x72
jne 0x47f2de
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 0x47f2ad
cmp dword [rbp - 0xc], 0x6e
jne 0x47f2de
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 0x47f2de
mov rax, qword [0x00c84628]
mov byte [rax + 0x80], 1
mov eax, dword [0x00c8460c]
jmp 0x47fbfd
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x47f2f3
mov rax, qword [0x00c84628]
mov byte [rax + 9], 1
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x47f308
mov rax, qword [0x00c84628]
mov byte [rax + 0xa], 1
mov eax, dword [rbp + 0x40]
and eax, 1
test eax, eax
je 0x47f31d
mov rax, qword [0x00c84628]
mov byte [rax + 0xb], 1
mov eax, dword [rbp + 0x40]
and eax, 2
test eax, eax
je 0x47f332
mov rax, qword [0x00c84628]
mov byte [rax + 0xc], 1
mov rax, qword [0x00c84628]
mov qword [rax + 0x10], 0
mov rdx, qword [0x00c84628]
mov rax, qword [0x00c84620]
mov rcx, rax
call fcn.0047e423
mov dword [0x00c84610], eax
mov eax, dword [0x00c84610]
test eax, eax
setne al
test al, al
je 0x47f38e
mov eax, dword [0x00c84610]
cmp eax, 0xffffffff
jne 0x47f38e
mov eax, dword [0x00c8460c]
mov ecx, eax
call fcn.0047e103
mov eax, 0xfffffff5
jmp 0x47fbfd
mov rdx, qword [0x00723088]
mov eax, dword [0x00c8460c]
cdqe
shl rax, 3
add rax, rdx
mov qword [0x00c84630], rax
mov dword [0x00c84610], 0
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x47f3d0
mov eax, dword [0x00c84610]
or eax, 0x80000000
mov dword [0x00c84610], eax
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x47f3eb
mov eax, dword [0x00c84610]
or eax, 0x40000000
mov dword [0x00c84610], eax
mov dword [0x00c84614], 3
mov eax, dword [rbp + 0x40]
and eax, 1
test eax, eax
je 0x47f40e
mov eax, dword [0x00c84614]
xor eax, 1
mov dword [0x00c84614], eax
mov eax, dword [rbp + 0x40]
and eax, 2
test eax, eax
je 0x47f427
mov eax, dword [0x00c84614]
xor eax, 2
mov dword [0x00c84614], eax
mov rax, qword [0x00c84628]
movzx eax, byte [rax + 0x60]
test al, al
je 0x47f895
mov rax, qword [0x00c84638]
test rax, rax
jne 0x47f45c
mov edx, 0
mov ecx, 0
call fcn.004462e2
mov qword [0x00c84638], rax
mov rax, qword [0x00c84628]
movzx eax, byte [rax + 0x60]
movzx eax, al
mov ecx, eax
call fcn.00449094
mov rbx, rax
lea rcx, [0x005b542d]
call fcn.00445ffe
mov rdx, rbx
mov rcx, rax
call fcn.00446e0d
mov rdx, rax
mov rax, qword [0x00c84638]
mov rcx, rax
call fcn.004464b0
mov edx, 2
lea rcx, [0x005b5430]
call fcn.004460b9
mov rdx, rax
mov rax, qword [0x00c84638]
mov rcx, rax
call fcn.00446e0d
mov rdx, rax
mov rax, qword [0x00c84638]
mov rcx, rax
call fcn.004464b0
mov rax, qword [0x00c84638]
mov rax, qword [rax]
add rax, 2
mov byte [rax], 0x4d
mov eax, dword [0x00c84610]
mov edx, eax
mov rax, qword [0x00c84638]
mov rax, qword [rax]
mov rbx, qword [0x00c84630]
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 [0x00c84630]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x47f557
mov eax, dword [0x00c8460c]
mov ecx, eax
call fcn.0047e103
mov eax, 0xfffffff8
jmp 0x47fbfd
mov r8d, 0x1c
mov edx, 0
lea rcx, [0x00c84640]
call sub.msvcrt.dll_memset
mov dword [0x00c84640], 0x1c
mov rax, qword [0x00c84630]
mov rax, qword [rax]
lea rdx, [0x00c84640]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCommState]
call rax
test eax, eax
sete al
test al, al
je 0x47f5cb
mov rax, qword [0x00c84630]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x00c8460c]
mov ecx, eax
call fcn.0047e103
mov eax, 0xfffffff8
jmp 0x47fbfd
mov r8d, 0x14
mov edx, 0
lea rcx, [0x00c84660]
call sub.msvcrt.dll_memset
mov rax, qword [0x00c84628]
mov eax, dword [rax + 0x64]
mov dword [0x00c84644], eax
mov rax, qword [0x00c84628]
movzx eax, byte [rax + 0x6a]
movsx eax, al
mov dword [0x00c84610], eax
mov eax, dword [0x00c84610]
cmp eax, 0xa
jne 0x47f61b
mov dword [0x00c84614], 0
mov eax, dword [0x00c84610]
cmp eax, 0xf
jne 0x47f630
mov dword [0x00c84614], 1
mov eax, dword [0x00c84610]
cmp eax, 0x14
jne 0x47f645
mov dword [0x00c84614], 2
mov eax, dword [0x00c84614]
mov byte [0x00c84654], al
mov rax, qword [0x00c84628]
movzx eax, byte [rax + 0x69]
mov byte [0x00c84652], al
mov rax, qword [0x00c84628]
movzx eax, byte [rax + 0x68]
movsx eax, al
mov dword [0x00c84610], eax
mov eax, dword [0x00c84610]
test eax, eax
jne 0x47f68a
mov dword [0x00c84614], 0
mov eax, dword [0x00c84610]
cmp eax, 1
jne 0x47f69f
mov dword [0x00c84614], 2
mov eax, dword [0x00c84610]
cmp eax, 2
jne 0x47f6b4
mov dword [0x00c84614], 1
mov eax, dword [0x00c84610]
cmp eax, 3
jne 0x47f6c9
mov dword [0x00c84614], 4
mov eax, dword [0x00c84610]
cmp eax, 4
jne 0x47f6de
mov dword [0x00c84614], 3
mov eax, dword [0x00c84614]
mov byte [0x00c84653], al
mov eax, dword [0x00c84614]
test eax, eax
jne 0x47f706
movzx eax, byte [0x00c84648]
and eax, 0xfffffffd
mov byte [0x00c84648], al
jmp 0x47f716
movzx eax, byte [0x00c84648]
or eax, 2
mov byte [0x00c84648], al
mov rax, qword [0x00c84628]
movzx eax, byte [rax + 0x6d]
test al, al
je 0x47f735
movzx eax, byte [0x00c84649]
and eax, 0xffffffcf
mov byte [0x00c84649], al
mov rax, qword [0x00c84628]
movzx eax, byte [rax + 0x6b]
test al, al
jne 0x47f756
movzx eax, byte [0x00c84648]
or eax, 1
mov byte [0x00c84648], al
jmp 0x47f766
movzx eax, byte [0x00c84648]
and eax, 0xfffffffe
mov byte [0x00c84648], al
mov byte [0x00c84658], 0x1a
mov rax, qword [0x00c84630]
mov rax, qword [rax]
lea rdx, [0x00c84640]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetCommState]
call rax
test eax, eax
sete al
test al, al
je 0x47f7c0
mov rax, qword [0x00c84630]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x00c8460c]
mov ecx, eax
call fcn.0047e103
mov eax, 0xfffffff8
jmp 0x47fbfd
mov rax, qword [0x00c84628]
mov eax, dword [rax + 0x78]
test eax, eax
jne 0x47f7ee
mov dword [0x00c84660], 0xffffffff
mov dword [0x00c84664], 0
mov dword [0x00c84668], 0
jmp 0x47f812
mov dword [0x00c84660], 0
mov dword [0x00c84664], 0
mov rax, qword [0x00c84628]
mov eax, dword [rax + 0x78]
mov dword [0x00c84668], eax
mov dword [0x00c8466c], 0
mov rax, qword [0x00c84628]
mov eax, dword [rax + 0x74]
mov dword [0x00c84670], eax
mov rax, qword [0x00c84630]
mov rax, qword [rax]
lea rdx, [0x00c84660]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
call rax
test eax, eax
sete al
test al, al
je 0x47f87f
mov rax, qword [0x00c84630]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [0x00c8460c]
mov ecx, eax
call fcn.0047e103
mov eax, 0xfffffff8
jmp 0x47fbfd
mov rax, qword [0x00c84628]
mov byte [rax + 8], 1
mov eax, dword [0x00c8460c]
jmp 0x47fbfd
mov dword [0x00c84618], 3
cmp dword [rbp + 0x48], 0
je 0x47f8b1
mov dword [0x00c84618], 4
jmp 0x47f8b2
nop
mov eax, dword [0x00c84618]
mov edi, eax
mov eax, dword [0x00c84614]
mov r12d, eax
mov eax, dword [0x00c84610]
mov esi, eax
mov rax, qword [0x00c84620]
mov rcx, rax
call fcn.00439185
mov rbx, qword [0x00c84630]
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 [0x00c84630]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x47fa53
cmp dword [rbp + 0x48], 3
jne 0x47f953
mov dword [0x00c84610], 0x80000000
mov rax, qword [0x00c84628]
mov byte [rax + 9], 1
mov rax, qword [0x00c84628]
mov byte [rax + 0xa], 0
add dword [rbp + 0x48], 1
jmp 0x47f8b2
cmp dword [rbp + 0x48], 4
jne 0x47f982
mov dword [0x00c84610], 0x40000000
mov rax, qword [0x00c84628]
mov byte [rax + 9], 0
mov rax, qword [0x00c84628]
mov byte [rax + 0xa], 1
add dword [rbp + 0x48], 1
jmp 0x47f8b2
mov eax, dword [0x00c8460c]
mov ecx, eax
call fcn.0047e103
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [0x00c8461c], eax
mov eax, dword [0x00c8461c]
cmp eax, 3
jne 0x47f9b3
mov eax, 0xfffffffa
jmp 0x47fbfd
mov eax, dword [0x00c8461c]
cmp eax, 4
je 0x47f9d4
mov eax, dword [0x00c8461c]
cmp eax, 0x1d
je 0x47f9d4
mov eax, dword [0x00c8461c]
cmp eax, 0x1e
jne 0x47f9de
mov eax, 0xfffffff7
jmp 0x47fbfd
mov eax, dword [0x00c8461c]
cmp eax, 5
je 0x47fa0a
mov eax, dword [0x00c8461c]
cmp eax, 0x13
je 0x47fa0a
mov eax, dword [0x00c8461c]
cmp eax, 0x21
je 0x47fa0a
mov eax, dword [0x00c8461c]
cmp eax, 0x20
jne 0x47fa14
mov eax, 0xfffffff9
jmp 0x47fbfd
mov eax, dword [0x00c8461c]
cmp eax, 0xf
je 0x47fa2a
mov eax, dword [0x00c8461c]
cmp eax, 0x15
jne 0x47fa34
mov eax, 0xfffffff8
jmp 0x47fbfd
mov eax, dword [0x00c8461c]
cmp eax, 2
jne 0x47fa49
mov eax, 0xfffffffb
jmp 0x47fbfd
mov eax, 0xfffffffb
jmp 0x47fbfd
cmp dword [rbp + 0x48], 2
jne 0x47fbec
mov rax, qword [0x00c84630]
mov rax, qword [rax]
lea rdx, [0x00c84678]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileSize]
call rax
mov dword [0x00c84674], eax
mov eax, dword [0x00c84674]
test eax, eax
jne 0x47fa98
mov eax, dword [0x00c84678]
test eax, eax
je 0x47fbec
mov rax, qword [0x00c84630]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov dword [0x00c84618], 5
mov eax, dword [0x00c84618]
mov edi, eax
mov eax, dword [0x00c84614]
mov r12d, eax
mov eax, dword [0x00c84610]
mov esi, eax
mov rax, qword [0x00c84620]
mov rcx, rax
call fcn.00439185
mov rbx, qword [0x00c84630]
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 [0x00c84630]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x47fbec
mov eax, dword [0x00c8460c]
mov ecx, eax
call fcn.0047e103
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [0x00c8461c], eax
mov eax, dword [0x00c8461c]
cmp eax, 3
jne 0x47fb5b
mov eax, 0xfffffffa
jmp 0x47fbfd
mov eax, dword [0x00c8461c]
cmp eax, 4
je 0x47fb7c
mov eax, dword [0x00c8461c]
cmp eax, 0x1d
je 0x47fb7c
mov eax, dword [0x00c8461c]
cmp eax, 0x1e
jne 0x47fb83
mov eax, 0xfffffff7
jmp 0x47fbfd
mov eax, dword [0x00c8461c]
cmp eax, 5
je 0x47fbaf
mov eax, dword [0x00c8461c]
cmp eax, 0x13
je 0x47fbaf
mov eax, dword [0x00c8461c]
cmp eax, 0x21
je 0x47fbaf
mov eax, dword [0x00c8461c]
cmp eax, 0x20
jne 0x47fbb6
mov eax, 0xfffffff9
jmp 0x47fbfd
mov eax, dword [0x00c8461c]
cmp eax, 0xf
je 0x47fbcc
mov eax, dword [0x00c8461c]
cmp eax, 0x15
jne 0x47fbd3
mov eax, 0xfffffff8
jmp 0x47fbfd
mov eax, dword [0x00c8461c]
cmp eax, 2
jne 0x47fbe5
mov eax, 0xfffffffb
jmp 0x47fbfd
mov eax, 0xfffffffb
jmp 0x47fbfd
mov rax, qword [0x00c84628]
mov byte [rax + 8], 1
mov eax, dword [0x00c8460c]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop r12
pop rbp
ret