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

Disassembly:
push edi
push esi
push ebx
sub esp, 0xd0
lea eax, [esp + 0xcc]
mov dword [esp + 0x10], 0xf0000040
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
sub esp, 0x14
test eax, eax
je 0x54d30b
lea eax, [esp + 0xc8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xcc]
mov dword [esp + 4], 4
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
sub esp, 0xc
mov ebx, eax
mov eax, dword [esp + 0xcc]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
sub esp, 8
test ebx, ebx
jne 0x54d471
mov dword [esp + 4], 0
mov dword [esp], str._dev_urandom
call fcn.005454b0
cmp eax, 0xffffffff
mov ebx, eax
je 0x54d354
lea eax, [esp + 0xc8]
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll__read
mov dword [esp], ebx
mov esi, eax
call sub.msvcrt.dll__close
cmp esi, 4
je 0x54d471
mov dword [esp + 4], 0
mov dword [esp], str._dev_random
call fcn.005454b0
cmp eax, 0xffffffff
mov ebx, eax
je 0x54d39d
lea eax, [esp + 0xc8]
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll__read
mov dword [esp], ebx
mov esi, eax
call sub.msvcrt.dll__close
cmp esi, 4
je 0x54d471
mov eax, dword [0x6e70c0]
mov edx, dword [0x6e70c4]
cmp dword [0x60bd14], 0x78
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
ja 0x54d55c
rdtsc
xor ecx, ecx
add ecx, eax
xor dword [0x6e7114], ecx
rdtsc
xor ecx, ecx
mov ebx, edx
xor edx, edx
add eax, ecx
adc edx, ebx
xor esi, esi
xor dword [0x6e7184], edx
mov edx, dword [esp + 0x2c]
or edx, dword [esp + 0x28]
jne 0x54d491
call sub.msvcrt.dll_clock
xor ebx, ebx
cmp eax, ebx
je 0x54d459
mov esi, dword [0x6e70c0]
mov ecx, eax
mov edi, dword [0x6e70c4]
add esi, 1
adc edi, 0
sub ecx, ebx
mov ebx, ecx
mov edx, esi
and edx, 0x1ff
xor ecx, ecx
cmp ebx, 0xc46031b9
setae cl
imul ecx, ecx, 0xc46031b9
mov dword [0x6e70c0], esi
mov dword [0x6e70c4], edi
sub ebx, ecx
add dword [edx*4 + 0x6e70e0], ebx
cmp edi, 0
ja 0x54d4ed
cmp esi, 0x40
ja 0x54d4ed
mov ebx, eax
call sub.msvcrt.dll_clock
cmp eax, ebx
jne 0x54d3f6
mov edx, dword [0x6e70c0]
mov ebx, eax
and edx, 0x1ff
add dword [edx*4 + 0x6e70e0], 1
jmp 0x54d450
mov eax, dword [esp + 0xc8]
add esp, 0xd0
pop ebx
pop esi
pop edi
ret
and eax, 0x1ff
mov esi, ebx
add dword [eax*4 + 0x6e70e0], 1
call sub.msvcrt.dll_clock
mov ebx, eax
mov eax, dword [0x6e70c0]
cmp ebx, esi
je 0x54d482
mov edx, dword [0x6e70c4]
add eax, 1
mov ecx, ebx
mov edi, eax
mov dword [0x6e70c0], eax
adc edx, 0
sub ecx, esi
mov esi, ecx
and edi, 0x1ff
xor ecx, ecx
cmp esi, 0xc46031b9
setae cl
imul ecx, ecx, 0xc46031b9
mov dword [0x6e70c4], edx
sub esi, ecx
add dword [edi*4 + 0x6e70e0], esi
sub eax, dword [esp + 0x28]
sbb edx, dword [esp + 0x2c]
cmp edx, 0
jbe 0x54d550
lea ebx, [esp + 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], 0xa0
call fcn.00582de4
mov dword [esp], ebx
mov dword [esp + 8], 0x800
mov dword [esp + 4], 0x6e70e0
call fcn.00551ca0
lea eax, [esp + 0xb4]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00551d90
mov eax, dword [esp + 0xb4]
mov edx, dword [esp + 0xc4]
add esp, 0xd0
pop ebx
pop esi
bswap eax
pop edi
bswap edx
add eax, edx
ret
cmp eax, 4
ja 0x54d4ed
mov esi, ebx
jmp 0x54d491
mov dword [esp + 0x14], 0x48
mov dword [esp + 0x10], str.libavutil_random_seed.c
mov dword [esp + 0xc], str.sizeof_tmp____av_sha_size
mov dword [esp + 8], 0x60bccc
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00539bd0
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop