Function at 0x684f30
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x6c
mov dword [esp + 0x1c], eax
mov eax, dword [eax + 8]
mov dword [esp + 0x3c], ecx
test eax, eax
mov dword [esp + 0x34], eax
je 0x68502d
movzx edx, byte [edx]
test dl, dl
mov byte [esp + 0x18], dl
je 0x685363
movzx edx, byte [esp + 0x18]
mov eax, ebx
xor esi, esi
add eax, 1
imul ecx, esi, 0xf4243
movzx esi, dl
movzx edx, byte [eax]
xor esi, ecx
test dl, dl
jne 0x684f68
mov edx, dword [esp + 0x34]
mov eax, esi
sub edx, 1
and eax, edx
mov ecx, dword [esp + 0x1c]
mov byte [esp + 0x14], 0
mov ecx, dword [ecx]
mov dword [esp + 0x30], ecx
mov ecx, edx
not edx
shr ecx, 2
and edx, esi
mov byte [esp + 0x20], cl
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x30]
lea ebp, [eax*4]
add edx, ebp
mov edi, dword [edx]
test edi, edi
je 0x685147
mov ebp, dword [edi]
movzx edx, byte [esp + 0x18]
cmp dl, byte [ebp]
jne 0x684fed
test dl, dl
je 0x685130
xor edx, edx
jmp 0x684fe2
add edx, 1
test cl, cl
je 0x685130
movzx ecx, byte [ebx + edx + 1]
cmp cl, byte [ebp + edx + 1]
je 0x684fd7
cmp byte [esp + 0x14], 0
jne 0x685015
mov edx, dword [esp + 0x1c]
movzx ecx, byte [edx + 4]
mov edx, dword [esp + 0x38]
sub ecx, 1
shr edx, cl
movzx ecx, byte [esp + 0x20]
and ecx, edx
mov byte [esp + 0x14], cl
or byte [esp + 0x14], 1
movzx edx, byte [esp + 0x14]
cmp eax, edx
jae 0x685140
add eax, dword [esp + 0x34]
sub eax, edx
jmp 0x684fa8
mov edx, dword [esp + 0x3c]
xor edi, edi
test edx, edx
je 0x685130
mov eax, dword [esp + 0x1c]
mov byte [eax + 4], 6
mov dword [eax + 8], 0x40
mov eax, dword [eax + 0x10]
mov dword [esp], 0x100
call dword [eax]
mov ecx, dword [esp + 0x1c]
test eax, eax
mov dword [ecx], eax
je 0x685390
test al, 1
mov edi, eax
mov edx, 0x100
jne 0x685371
test edi, 2
jne 0x685380
mov ecx, edx
xor eax, eax
shr ecx, 2
test dl, 2
rep stosd dword es:[edi], eax
jne 0x685345
and edx, 1
jne 0x68533d
movzx edx, byte [ebx]
xor ebp, ebp
test dl, dl
je 0x6850cb
mov ecx, ebx
xor eax, eax
add ecx, 1
imul esi, eax, 0xf4243
movzx eax, dl
movzx edx, byte [ecx]
xor eax, esi
test dl, dl
jne 0x6850a7
mov edx, dword [esp + 0x1c]
mov ebp, dword [edx + 8]
sub ebp, 1
and ebp, eax
shl ebp, 2
mov eax, dword [esp + 0x1c]
mov edx, ebp
add edx, dword [eax]
mov ecx, dword [esp + 0x1c]
xor edi, edi
mov eax, dword [ecx + 0x10]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x10], edx
mov dword [esp], ecx
call dword [eax]
mov edx, dword [esp + 0x10]
mov dword [edx], eax
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
mov eax, dword [eax + ebp]
test eax, eax
je 0x685130
mov ecx, dword [esp + 0x3c]
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [esp + 8], ecx
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x1c]
add ebp, dword [eax]
mov eax, dword [ebp]
mov dword [eax], ebx
mov eax, dword [esp + 0x1c]
mov edi, dword [ebp]
add dword [eax + 0xc], 1
lea esi, [esi]
add esp, 0x6c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
sub eax, edx
jmp 0x684fa8
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x685130
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax + 4]
movzx ecx, al
sub ecx, 1
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x1c]
mov byte [esp + 0x14], al
mov eax, dword [ecx + 0xc]
movzx ecx, byte [esp + 0x18]
shr eax, cl
test eax, eax
je 0x6850d3
movzx eax, byte [esp + 0x14]
mov dword [esp + 0x34], 1
add eax, 1
movzx edx, al
mov ecx, eax
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x1c]
shl dword [esp + 0x34], cl
mov ebp, dword [esp + 0x34]
mov byte [esp + 0x57], al
mov eax, dword [edx + 0x10]
shl ebp, 2
mov dword [esp], ebp
call dword [eax]
test eax, eax
mov dword [esp + 0x18], eax
je 0x685130
mov edx, dword [esp + 0x34]
mov dword [esp + 8], ebp
mov dword [esp + 4], 0
mov dword [esp], eax
sub edx, 1
mov dword [esp + 0x30], edx
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 8]
test eax, eax
mov dword [esp + 0x38], eax
je 0x68539c
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x5c], ebx
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x14], 0
shr edx, 2
mov byte [esp + 0x40], dl
mov edx, dword [esp + 0x30]
mov eax, dword [ecx]
mov dword [esp + 0x58], esi
not edx
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x20]
sub edx, 1
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x18]
nop
lea esi, [esi]
mov ecx, dword [esp + 0x14]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x6852b2
mov ebp, dword [esi]
xor eax, eax
xor edi, edi
movzx ecx, byte [ebp]
test cl, cl
je 0x68526c
lea esi, [esi]
add ebp, 1
imul eax, edi, 0xf4243
movzx edi, cl
movzx ecx, byte [ebp]
xor edi, eax
test cl, cl
jne 0x685250
mov eax, dword [esp + 0x30]
and eax, edi
movzx ecx, byte [esp + 0x20]
and edi, dword [esp + 0x50]
shr edi, cl
movzx ecx, byte [esp + 0x40]
and edi, ecx
xor ecx, ecx
or edi, 1
lea ebp, [edx + eax*4]
cmp dword [ebp], 0
je 0x6852a9
test cl, cl
cmove ecx, edi
movzx ebp, cl
cmp eax, ebp
jae 0x685358
add eax, ebx
sub eax, ebp
lea ebp, [edx + eax*4]
cmp dword [ebp], 0
jne 0x68528c
mov ecx, dword [esp + 0x1c]
mov dword [ebp], esi
mov eax, dword [ecx]
add dword [esp + 0x14], 1
mov ecx, dword [esp + 0x38]
cmp dword [esp + 0x14], ecx
jne 0x685230
mov esi, dword [esp + 0x58]
mov ebx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x10]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
movzx ecx, byte [esp + 0x57]
mov dword [eax], edx
mov edx, dword [esp + 0x34]
mov byte [eax + 4], cl
movzx ecx, byte [esp + 0x20]
mov dword [eax + 8], edx
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x30]
and eax, esi
and esi, dword [esp + 0x50]
shr edx, 2
shr esi, cl
xor ecx, ecx
and esi, edx
or esi, 1
mov edx, dword [esp + 0x18]
lea ebp, [eax*4]
add edx, ebp
mov edi, dword [edx]
test edi, edi
je 0x6850d3
test cl, cl
cmove ecx, esi
movzx edx, cl
cmp eax, edx
jae 0x68535f
add eax, dword [esp + 0x34]
sub eax, edx
jmp 0x685312
mov byte [edi], 0
jmp 0x68509a
mov word [edi], 0
add edi, 2
and edx, 1
je 0x68509a
jmp 0x68533d
sub eax, ebp
jmp 0x685283
sub eax, edx
jmp 0x685312
mov edx, eax
xor esi, esi
sub edx, 1
xor eax, eax
jmp 0x684f88
mov byte [eax], 0
add edi, 1
mov dx, 0xff
jmp 0x685073
mov word [edi], 0
sub edx, 2
add edi, 2
jmp 0x68507f
mov dword [ecx + 8], 0
jmp 0x685130
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
mov edx, dword [esp + 0x30]
not edx
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x20]
sub edx, 1
mov dword [esp + 0x20], edx
jmp 0x6852cd