Function at 0x502c40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ebp + 8]
mov eax, 0x1fffffff
push ebx
mov ebx, ecx
bsr ecx, eax
push esi
push edi
mov edi, 1
mov dword [ebp - 0x1c], ebx
mov eax, edi
shl eax, cl
cmp edx, eax
ja 0x502f0c
mov esi, dword [ebx + 4]
lea eax, [edx - 1]
or eax, edi
mov dword [ebp - 8], esi
bsr ecx, eax
push esi
lea ecx, [ecx + 1]
shl edi, cl
lea ecx, [ebx + 0xc]
lea eax, [edi + edi]
push eax
call fcn.004948d0
lea eax, [edi - 1]
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x18], eax
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx]
mov edx, ecx
cmp ecx, esi
je 0x502edf
mov eax, dword [ecx + 0x18]
lea ebx, [ecx + 8]
mov edx, dword [edx]
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x14], edx
mov dword [ebp + 8], ebx
mov dword [ebp - 0x18], eax
cmp eax, 0x10
jb 0x502cc3
mov eax, dword [ebx]
mov dword [ebp + 8], eax
xor edi, edi
mov ebx, 0x811c9dc5
cmp dword [ebp - 0xc], edi
jbe 0x502cec
mov esi, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
movzx eax, byte [edi + esi]
inc edi
xor eax, ebx
imul ebx, eax, 0x1000193
cmp edi, edx
jb 0x502cd5
mov edx, dword [ebp - 0x14]
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov edi, dword [eax + 0x18]
mov eax, dword [eax + 0xc]
and edi, ebx
lea eax, [eax + edi*8]
mov dword [ebp - 0x10], eax
cmp dword [eax], esi
jne 0x502d0b
mov dword [eax], ecx
mov dword [eax + 4], ecx
jmp 0x502ed5
mov eax, dword [eax + 4]
cmp dword [eax + 0x1c], 0x10
lea ebx, [eax + 8]
mov edi, dword [ebx + 0x10]
mov dword [ebp - 0x14], ebx
mov dword [ebp + 8], edi
jb 0x502d25
mov ebx, dword [ebx]
mov dword [ebp - 0x14], ebx
cmp dword [ebp - 0x18], 0x10
lea edi, [ecx + 8]
mov dword [ebp - 4], edi
jb 0x502d37
mov edi, dword [ecx + 8]
mov dword [ebp - 4], edi
mov esi, dword [ebp - 0xc]
cmp esi, dword [ebp + 8]
mov esi, dword [ebp - 8]
jne 0x502df4
mov esi, dword [ebp - 0xc]
mov dword [ebp + 8], esi
sub dword [ebp + 8], 4
mov esi, dword [ebp - 8]
jb 0x502d70
mov edi, dword [edi]
cmp edi, dword [ebx]
jne 0x502d76
mov edi, dword [ebp - 4]
add ebx, 4
add edi, 4
mov dword [ebp - 0x14], ebx
sub dword [ebp + 8], 4
mov dword [ebp - 4], edi
jae 0x502d55
cmp dword [ebp + 8], 0xfffffffc
je 0x502dbc
mov edi, dword [ebp - 4]
mov bl, byte [edi]
mov edi, dword [ebp - 0x14]
cmp bl, byte [edi]
jne 0x502db5
cmp dword [ebp + 8], 0xfffffffd
je 0x502dbc
mov ebx, dword [ebp - 4]
mov bl, byte [ebx + 1]
cmp bl, byte [edi + 1]
jne 0x502db5
cmp dword [ebp + 8], 0xfffffffe
je 0x502dbc
mov ebx, dword [ebp - 4]
mov bl, byte [ebx + 2]
cmp bl, byte [edi + 2]
jne 0x502db5
cmp dword [ebp + 8], 0xffffffff
je 0x502dbc
mov ebx, dword [ebp - 4]
mov bl, byte [ebx + 3]
cmp bl, byte [edi + 3]
je 0x502dbc
sbb edi, edi
or edi, 1
jmp 0x502dbe
xor edi, edi
test edi, edi
jne 0x502df4
mov eax, dword [eax]
mov dword [ebp + 8], eax
cmp eax, ecx
je 0x502de9
mov ebx, dword [ecx + 4]
mov esi, dword [ebp + 8]
mov dword [ebx], edx
mov edi, dword [edx + 4]
mov dword [edi], eax
mov eax, dword [eax + 4]
mov dword [eax], ecx
mov dword [esi + 4], edi
mov esi, dword [ebp - 8]
mov dword [edx + 4], ebx
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 4], ecx
jmp 0x502ed5
mov edi, dword [ebp - 0x10]
cmp dword [edi], eax
je 0x502eb2
nop
mov eax, dword [eax + 4]
cmp dword [eax + 0x1c], 0x10
lea edi, [eax + 8]
mov ebx, dword [edi + 0x10]
mov dword [ebp + 8], ebx
jb 0x502e14
mov edi, dword [edi]
cmp dword [ebp - 0x18], 0x10
lea ebx, [ecx + 8]
mov dword [ebp - 4], ebx
jb 0x502e26
mov ebx, dword [ecx + 8]
mov dword [ebp - 4], ebx
mov esi, dword [ebp - 0xc]
cmp esi, dword [ebp + 8]
mov esi, dword [ebp - 8]
jne 0x502ea7
mov esi, dword [ebp - 0xc]
mov dword [ebp + 8], esi
sub dword [ebp + 8], 4
mov esi, dword [ebp - 8]
jb 0x502e58
mov ebx, dword [ebx]
cmp ebx, dword [edi]
jne 0x502e5e
mov ebx, dword [ebp - 4]
add edi, 4
add ebx, 4
sub dword [ebp + 8], 4
mov dword [ebp - 4], ebx
jae 0x502e40
cmp dword [ebp + 8], 0xfffffffc
je 0x502ea1
mov ebx, dword [ebp - 4]
mov bl, byte [ebx]
cmp bl, byte [edi]
jne 0x502e9a
cmp dword [ebp + 8], 0xfffffffd
je 0x502ea1
mov ebx, dword [ebp - 4]
mov bl, byte [ebx + 1]
cmp bl, byte [edi + 1]
jne 0x502e9a
cmp dword [ebp + 8], 0xfffffffe
je 0x502ea1
mov ebx, dword [ebp - 4]
mov bl, byte [ebx + 2]
cmp bl, byte [edi + 2]
jne 0x502e9a
cmp dword [ebp + 8], 0xffffffff
je 0x502ea1
mov ebx, dword [ebp - 4]
mov bl, byte [ebx + 3]
cmp bl, byte [edi + 3]
je 0x502ea1
sbb edi, edi
or edi, 1
jmp 0x502ea3
xor edi, edi
test edi, edi
je 0x502ee8
mov ebx, dword [ebp - 0x10]
cmp dword [ebx], eax
jne 0x502e00
mov ebx, dword [ecx + 4]
mov dword [ebp + 8], ebx
mov dword [ebx], edx
mov ebx, dword [edx + 4]
mov dword [ebx], eax
mov edi, dword [eax + 4]
mov dword [edi], ecx
mov dword [eax + 4], ebx
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [ecx + 4], edi
mov dword [eax], ecx
mov ecx, edx
cmp edx, esi
jne 0x502ca2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [ecx + 4]
mov eax, dword [eax]
mov dword [ebp + 8], eax
mov esi, eax
mov dword [ebx], edx
mov edi, dword [edx + 4]
mov dword [edi], eax
mov eax, dword [eax + 4]
mov dword [eax], ecx
mov dword [esi + 4], edi
mov esi, dword [ebp - 8]
mov dword [edx + 4], ebx
mov dword [ecx + 4], eax
jmp 0x502ed5
push str.invalid_hash_bucket_count
call fcn.006ee17a
int3