Function at 0x51da90
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 8]
mov edx, dword [ebx]
movzx eax, byte [ebx + 0x1be]
mov dword [ebp - 4], edx
mov dword [ebp - 0x20], eax
test dword [edx + 0xc], 0x4000000
je 0x51df89
mov eax, dword [ebp + 0xc]
push esi
push edi
mov edi, 0xfff0bdc0
mov ecx, dword [eax + 0x44]
mov dword [ebp - 8], edi
test ecx, ecx
je 0x51daef
mov esi, dword [edx + 4]
xor edi, edi
mov dword [ebp - 8], edi
test esi, esi
jle 0x51daef
mov eax, dword [edx + 8]
add eax, 0xc
nop dword [eax]
cmp dword [eax], ecx
je 0x51daec
inc edi
add eax, 0x10
cmp edi, esi
jl 0x51dae0
mov dword [ebp - 8], edi
mov eax, dword [edx + 8]
mov ecx, edi
add ecx, ecx
mov ecx, dword [eax + ecx*8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], ecx
mov edi, dword [eax + 0x24]
test edi, edi
je 0x51dd96
nop word [eax + eax]
cmp byte [ebx + 0x1be], 0
push ecx
push dword [edi + 8]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
je 0x51db3d
push edx
call fcn.0051d0a0
add esp, 0xc
jmp 0x51db48
push 0
push ebx
call fcn.005264d0
add esp, 0x10
mov esi, eax
test esi, esi
je 0x51dc67
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push esi
push ebx
call fcn.00500870
add esp, 0x14
test eax, eax
jne 0x51dc67
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x51db7b
mov edx, eax
mov dword [ebp - 0xc], eax
jmp 0x51db87
mov eax, dword [edi + 0x24]
lea edx, [ebp - 0x24]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xc], edx
xor eax, eax
mov dword [ebp - 0x1c], eax
cmp dword [edi + 0x14], eax
jle 0x51dbfc
mov ebx, dword [ebp + 0xc]
lea ecx, [eax*4]
mov eax, dword [ecx + edx]
cmp eax, dword [ebx + 4]
mov ebx, dword [ebp + 8]
jne 0x51dbad
mov dword [ecx + edx], 0xffffffff
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10c], 0
je 0x51dbf0
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x51dbc8
mov eax, dword [eax + 8]
mov eax, dword [ecx + eax]
jmp 0x51dbcb
mov eax, dword [esi + 4]
push dword [ebp - 8]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0xc]
push dword [eax + ecx*8]
push dword [esi]
push ebx
call fcn.00511270
mov edx, dword [ebp - 0xc]
xor ecx, ecx
add esp, 0x10
cmp eax, 2
sete cl
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, dword [edi + 0x14]
jl 0x51db91
push dword [esi]
push 0
push dword [esi + 0x14]
push dword [ebp - 8]
push ebx
call fcn.00531070
inc dword [ebx + 0x44]
add esp, 0x14
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x51dc33
push dword [ebp - 0x14]
push 0xffffffffffffffff
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 0x10]
push esi
push dword [ebp - 8]
push ebx
call fcn.004f1140
add esp, 0x24
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x51dc54
push dword [ebp - 0x14]
push 1
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 0x10]
push esi
push dword [ebp - 8]
push ebx
call fcn.004f1140
add esp, 0x24
push dword [ebp - 0x18]
push dword [ebp - 4]
call fcn.00518300
add esp, 8
jmp 0x51dd85
cmp dword [ebp - 0x20], 0
je 0x51df87
mov edx, dword [ebp - 4]
cmp byte [edx + 0x1e], 0
jne 0x51df87
test esi, esi
jne 0x51dd88
mov esi, dword [ebx + 0xc]
test esi, esi
jne 0x51dcae
push dword [ebx]
call fcn.00535520
mov esi, eax
add esp, 4
mov dword [ebx + 0xc], esi
test esi, esi
je 0x51dcae
push 0x94
push esi
call fcn.00534c80
add esp, 8
mov eax, dword [esi + 0x1c]
xor edx, edx
mov ecx, dword [edi + 0x14]
inc eax
add eax, ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x10], eax
test ecx, ecx
jle 0x51dd30
lea ebx, [edi + 0x24]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebx]
inc ecx
add eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x1c], eax
cmp dword [esi + 0x20], eax
jg 0x51dcec
push esi
call fcn.004feff0
add esp, 4
test eax, eax
jne 0x51dd1e
mov eax, dword [ebp - 0x1c]
inc dword [esi + 0x1c]
lea ecx, [eax + eax*4]
mov eax, dword [esi + 4]
mov edx, dword [ebp - 0x14]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [ebp - 0x10]
mov word [eax + ecx*4], 0x49
mov byte [eax + ecx*4 + 3], 0
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov edx, dword [ebp - 0x18]
add ebx, 8
inc edx
mov dword [ebp - 0x18], edx
cmp edx, dword [edi + 0x14]
jl 0x51dcc6
mov ebx, dword [ebp + 8]
movzx eax, byte [edi + 0x18]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x1c], eax
cmp dword [esi + 0x20], eax
jg 0x51dd52
push esi
call fcn.004feff0
add esp, 4
test eax, eax
jne 0x51dd85
mov eax, dword [ebp - 0x1c]
inc dword [esi + 0x1c]
lea ecx, [eax + eax*4]
mov eax, dword [esi + 4]
mov edx, dword [ebp - 0x18]
mov word [eax + ecx*4], 0x75
mov byte [eax + ecx*4 + 3], 0
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], 0xffffffff
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov edx, dword [ebp - 4]
mov edi, dword [edi + 4]
mov ecx, dword [ebp - 0x28]
test edi, edi
jne 0x51db10
mov edi, dword [ebp + 0xc]
mov ecx, dword [edi]
mov esi, ecx
mov dword [ebp - 0x28], ecx
test ecx, ecx
je 0x51ddbe
cmp byte [ecx], 0
je 0x51ddb6
nop dword [eax]
inc esi
cmp byte [esi], 0
jne 0x51ddb0
sub esi, ecx
and esi, 0x3fffffff
mov eax, dword [edi + 0x44]
add eax, 0x38
mov dword [ebp - 0x18], eax
cmp dword [eax + 0xc], 0
je 0x51de17
mov eax, ecx
xor edi, edi
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x51de07
mov ebx, esi
nop word [eax + eax]
movzx eax, byte [eax]
lea ecx, [edi*8]
dec ebx
movzx edx, byte [eax + 0x5f0120]
mov eax, dword [ebp - 0x1c]
xor edx, ecx
inc eax
xor edi, edx
mov dword [ebp - 0x1c], eax
test ebx, ebx
jg 0x51dde0
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov eax, edi
xor edx, edx
mov edi, dword [ebp - 0x18]
div dword [edi]
mov eax, edi
mov edi, dword [ebp + 0xc]
jmp 0x51de19
xor edx, edx
push edx
push esi
push ecx
push eax
call fcn.004f0180
add esp, 0x10
test eax, eax
je 0x51df87
mov esi, dword [eax + 8]
test esi, esi
je 0x51df87
nop dword [eax + eax]
cmp byte [esi + 0x18], 0
mov dword [ebp - 0x18], 0
mov dword [ebp + 8], 0
jne 0x51de6a
cmp dword [ebx + 0x1ac], 0
jne 0x51de6a
cmp byte [ebx + 0x15c], 0
je 0x51df79
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x18]
push eax
push esi
push edi
push ebx
call fcn.00500870
add esp, 0x14
test eax, eax
je 0x51de9d
cmp dword [ebp - 0x20], 0
je 0x51df87
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1e], 0
jne 0x51df87
jmp 0x51df79
push 0x48
push dword [ebp - 4]
call fcn.00518390
mov edi, eax
add esp, 8
test edi, edi
je 0x51df6b
push 0x48
push 0
push edi
call fcn.005b9c20
mov eax, 1
mov word [edi + 2], ax
movsx eax, word [edi]
push eax
push 1
push edi
push dword [ebp - 4]
call fcn.005304a0
mov edi, eax
add esp, 0x1c
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1e], 0
je 0x51dee8
push edi
push eax
jmp 0x51df63
movsx eax, word [edi]
mov ecx, dword [ebp + 0x14]
shl eax, 6
mov dword [eax + edi - 0x34], 0
mov dword [eax + edi - 0x38], 0
mov eax, dword [esi]
mov dword [edi + 0x14], eax
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [edi + 0xc], eax
mov eax, dword [edi + 0x14]
inc word [eax + 0x20]
mov eax, dword [ebx + 0x44]
mov dword [edi + 0x28], eax
inc dword [ebx + 0x44]
mov eax, dword [ebp - 0x18]
test ecx, ecx
je 0x51df3c
push 0xffffffffffffffff
push ecx
push dword [ebp + 8]
push esi
push eax
push dword [ebp + 0xc]
push edi
push ebx
call fcn.004f1950
mov eax, dword [ebp - 0x18]
add esp, 0x20
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x51df58
push 1
push ecx
push dword [ebp + 8]
push esi
push eax
push dword [ebp + 0xc]
push edi
push ebx
call fcn.004f1950
add esp, 0x20
push edi
push dword [ebp - 4]
mov dword [edi + 0xc], 0
call fcn.005301b0
add esp, 8
push dword [ebp + 8]
push dword [ebp - 4]
call fcn.00518300
add esp, 8
mov esi, dword [esi + 0xc]
mov edi, dword [ebp + 0xc]
test esi, esi
jne 0x51de40
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret