Function at 0x140378280
Capabilities:
Execute anti-debugging instructions
Generate random numbers via winapi
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xe0
lea r8, str.Microsoft_Primitive_Provider
lea rdx, [0x14043e99a]
xor r9d, r9d
lea rcx, [rsp + 0x38]
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
test eax, eax
js 0x1403782f0
mov rcx, qword [rsp + 0x38]
lea rdx, [rsp + 0x34]
xor r9d, r9d
mov r8d, 4
call sub.bcrypt.dll_BCryptGenRandom
mov rcx, qword [rsp + 0x38]
mov ebx, eax
xor edx, edx
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
test ebx, ebx
js 0x1403782f0
mov eax, dword [rsp + 0x34]
add rsp, 0xe0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rcx, str._dev_urandom
xor edx, edx
call fcn.140364090
cmp eax, 0xffffffff
mov ebx, eax
je 0x140378325
lea rdx, [rsp + 0x34]
mov r8d, 4
mov ecx, eax
call sub.msvcrt.dll__read
mov ecx, ebx
mov esi, eax
call sub.msvcrt.dll__close
cmp esi, 4
je 0x1403782d6
lea rcx, str._dev_random
xor edx, edx
call fcn.140364090
cmp eax, 0xffffffff
mov ebx, eax
je 0x14037835e
lea rdx, [rsp + 0x34]
mov r8d, 4
mov ecx, eax
call sub.msvcrt.dll__read
mov ecx, ebx
mov esi, eax
call sub.msvcrt.dll__close
cmp esi, 4
je 0x1403782d6
mov rax, qword [0x140440440]
mov r12, qword [0x1405ed5e0]
cmp dword [rax], 0x78
ja 0x14037852e
lfence
rdtsc
xor dword [0x1405ece14], eax
lfence
rdtsc
xor edi, edi
xor dword [0x1405ece84], edx
xor esi, esi
xor ebp, ebp
test r12, r12
lea rbx, [0x1405ecde0]
jne 0x140378477
jmp 0x1403783ed
add rdx, 1
xor ecx, ecx
mov r10d, esi
mov r8, rdx
mov qword [0x1405ed5e0], rdx
and r8d, 0x1ff
cmp esi, 0xc46031b9
setae cl
imul ecx, ecx, 0xc46031b9
sub r10d, ecx
mov ecx, eax
add dword [rbx + r8*4], r10d
sub ecx, edi
cmp ecx, 0x1e
jle 0x1403783e6
cmp rdx, 0x40
ja 0x1403784d1
test edi, edi
mov ebp, eax
cmove edi, eax
call sub.msvcrt.dll_clock
lea edx, [rbp + rsi*2]
mov esi, eax
sub esi, ebp
cmp eax, edx
mov rdx, qword [0x1405ed5e0]
jg 0x1403783a3
and edx, 0x1ff
xor ecx, ecx
mov r11d, esi
imul r8d, dword [rbx + rdx*4], 0x19660d
cmp esi, 0xc46031b9
setae cl
imul ecx, ecx, 0xc46031b9
sub r11d, ecx
lea ecx, [r8 + r11 + 0x3c6ef35f]
mov dword [rbx + rdx*4], ecx
jmp 0x1403783e6
and edx, 0x1ff
xor ecx, ecx
mov r9d, esi
imul r8d, dword [rbx + rdx*4], 0x19660d
cmp esi, 0xc46031b9
setae cl
imul ecx, ecx, 0xc46031b9
sub r9d, ecx
lea ecx, [r8 + r9 + 0x3c6ef35f]
mov dword [rbx + rdx*4], ecx
test edi, edi
mov ebp, eax
cmove edi, eax
call sub.msvcrt.dll_clock
lea edx, [rbp + rsi*2]
mov esi, eax
sub esi, ebp
cmp eax, edx
mov rdx, qword [0x1405ed5e0]
jle 0x140378440
add rdx, 1
xor ecx, ecx
mov r10d, esi
mov r8, rdx
mov qword [0x1405ed5e0], rdx
and r8d, 0x1ff
cmp esi, 0xc46031b9
setae cl
imul ecx, ecx, 0xc46031b9
sub r10d, ecx
mov ecx, eax
add dword [rbx + r8*4], r10d
sub ecx, edi
cmp ecx, 0x1e
jle 0x140378470
sub rdx, r12
cmp rdx, 4
jbe 0x140378470
lfence
rdtsc
lea rbx, [rsp + 0x60]
mov edx, 0xa0
add dword [0x1405ecf9c], eax
mov rcx, rbx
call fcn.1403b4740
lea rdx, [0x1405ecde0]
mov r8d, 0x800
mov rcx, rbx
call fcn.14037d790
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.14037d900
mov eax, dword [rsp + 0x40]
bswap eax
mov edx, eax
mov eax, dword [rsp + 0x50]
bswap eax
add eax, edx
add rsp, 0xe0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rax, str.libavutil_random_seed.c
lea r9, str.sizeof_tmp____av_sha_size
lea r8, [0x14043e9d6]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], 0x4d
mov qword [rsp + 0x20], rax
call fcn.14036cf30
call sub.msvcrt.dll_abort
nop
nop