Function at 0x54f680
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x617960]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x54f99d
cmp dword [0x6342c4], 0
push esi
push edi
je 0x54f6fd
lea eax, [ebp - 0x28]
push eax
call fcn.0051e900
push 0xdf
push str.F:Gitcurllookaside_opensslcrypto_randmd_rand.c
push 0x13
push 5
call fcn.0051eae0
lea eax, [ebp - 0x28]
push eax
push 0x6346f4
call fcn.0051e890
mov esi, eax
push 0xe1
neg esi
push str.F:Gitcurllookaside_opensslcrypto_randmd_rand.c
sbb esi, esi
push 0x13
inc esi
push 6
mov dword [ebp - 0x1c], esi
call fcn.0051eae0
add esp, 0x2c
test esi, esi
jne 0x54f71a
jmp 0x54f704
mov dword [ebp - 0x1c], 0
push 0xe6
push str.F:Gitcurllookaside_opensslcrypto_randmd_rand.c
push 0x12
push 9
call fcn.0051eae0
add esp, 0x10
mov ecx, dword [0x6342ac]
mov edi, ecx
mov eax, dword [0x6342b0]
add ecx, ebx
mov dword [ebp - 0x30], eax
mov eax, dword [0x6342b4]
mov dword [ebp - 0x2c], eax
mov eax, dword [0x6342dc]
mov dword [ebp - 8], eax
mov dword [0x6342ac], ecx
movdqu xmm0, xmmword [0x6342cc]
movdqu xmmword [ebp - 0x18], xmm0
cmp ecx, 0x3ff
jb 0x54f783
mov eax, 0x401005
mov dword [0x6342a8], 0x3ff
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 9
imul eax, eax, 0xfffffc01
add ecx, eax
mov dword [0x6342ac], ecx
jmp 0x54f799
mov eax, dword [0x6342a8]
cmp eax, 0x3ff
jae 0x54f799
cmp ecx, eax
cmova eax, ecx
mov dword [0x6342a8], eax
mov eax, 0x66666667
mov ecx, ebx
imul ebx
sar edx, 3
mov esi, edx
shr esi, 0x1f
add esi, edx
lea eax, [esi + esi*4]
shl eax, 2
sub ecx, eax
xor eax, eax
test ecx, ecx
setg al
add eax, esi
add dword [0x6342b4], eax
cmp dword [ebp - 0x1c], 0
jne 0x54f7df
push 0x106
push str.F:Gitcurllookaside_opensslcrypto_randmd_rand.c
push 0x12
push 0xa
call fcn.0051eae0
add esp, 0x10
lea eax, [ebp - 0x48]
push eax
call fcn.00523230
add esp, 4
test ebx, ebx
jle 0x54f8fc
lea ecx, [ebx - 1]
mov eax, 0xcccccccd
mul ecx
mov eax, edx
shr eax, 4
inc eax
mov dword [ebp - 0x24], eax
mov eax, 0x14
jmp 0x54f810
cmp ebx, 0x14
mov esi, ebx
push 0
cmovg esi, eax
call fcn.00523350
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00522e10
push 0x14
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00522fc0
lea ecx, [edi - 0x3ff]
add esp, 0x18
add ecx, esi
test ecx, ecx
jle 0x54f878
mov eax, esi
sub eax, ecx
push eax
lea eax, [edi + 0x6342e0]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00522fc0
lea eax, [edi - 0x3ff]
add eax, esi
push eax
lea eax, [ebp - 0x48]
push 0x6342e0
push eax
call fcn.00522fc0
add esp, 0x18
jmp 0x54f88c
push esi
lea eax, [edi + 0x6342e0]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00522fc0
add esp, 0xc
push esi
push dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call fcn.00522fc0
push 8
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00522fc0
push 0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00522d60
inc dword [ebp - 0x2c]
add esp, 0x24
add dword [ebp - 0x20], esi
xor ecx, ecx
test esi, esi
jle 0x54f8eb
jmp 0x54f8d0
mov al, byte [ebp + ecx - 0x18]
xor byte [edi + 0x6342e0], al
inc edi
xor eax, eax
cmp edi, 0x3ff
cmovge edi, eax
inc ecx
cmp ecx, esi
jl 0x54f8d0
sub ebx, 0x14
mov eax, 0x14
dec dword [ebp - 0x24]
jne 0x54f810
lea eax, [ebp - 0x48]
push eax
call fcn.00522fd0
mov ebx, dword [ebp - 0x1c]
add esp, 4
pop edi
pop esi
test ebx, ebx
jne 0x54f927
push 0x137
push str.F:Gitcurllookaside_opensslcrypto_randmd_rand.c
push 0x12
push 9
call fcn.0051eae0
add esp, 0x10
movdqu xmm0, xmmword [ebp - 0x18]
mov eax, 0x6342cc
xor ecx, ecx
mov edx, 4
movdqu xmm1, xmmword [eax]
pxor xmm1, xmm0
movdqu xmmword [eax], xmm1
jmp 0x54f950
mov al, byte [ebp + ecx - 8]
lea ecx, [ecx + 1]
xor byte [ecx + 0x6342db], al
dec edx
jne 0x54f950
movsd xmm0, qword [0x5e2178]
movsd xmm1, qword [0x6342b8]
comisd xmm0, xmm1
jbe 0x54f983
addsd xmm1, qword [ebp + 0x10]
movsd qword [0x6342b8], xmm1
test ebx, ebx
jne 0x54f99d
push 0x144
push str.F:Gitcurllookaside_opensslcrypto_randmd_rand.c
push 0x12
push 0xa
call fcn.0051eae0
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0049355b
mov esp, ebp
pop ebp
ret