Function at 0x539684
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe4
mov ebp, ecx
mov byte [esp], dl
mov edi, eax
mov ecx, 0x341
lea eax, [ecx + 0x1d5]
mov ebx, 0x17d
cdq
idiv ebx
test edx, edx
jne 0x5396d6
mov eax, ecx
mov ebx, 0x17d
cdq
idiv ebx
test edx, edx
jne 0x5396d6
fld qword [esp + 0x10]
fdiv qword [esp + 8]
fsubr qword [esp + 8]
fsub qword [esp + 0x10]
fadd qword [esp + 8]
fsub qword [esp + 0x10]
fstp qword [esp + 8]
wait
jmp 0x539739
imul eax, ecx, 0x16a
imul ecx
sub eax, 0x1d5
sub eax, ecx
mov ebx, 0x16a
cdq
idiv ebx
test edx, edx
jne 0x53971d
fld qword [esp + 0x10]
fadd qword [esp + 8]
fstp qword [esp + 8]
wait
fld qword [esp + 0x10]
fdiv qword [esp + 8]
fsubr qword [esp + 8]
fsub qword [esp + 0x10]
fadd qword [esp + 8]
fsub qword [esp + 0x10]
fstp qword [esp + 0x10]
wait
jmp 0x539739
mov eax, ecx
imul ecx
add eax, ecx
add eax, 0x16a
mov ebx, 0x6b
cdq
idiv ebx
test edx, edx
je 0x539739
mov ecx, 0x45
test ecx, ecx
jl 0x539734
cmp ecx, 0x38
mov ecx, 0x13b
lea eax, [ecx + 0x1d1]
mov ebx, 0x14d
cdq
idiv ebx
test edx, edx
jne 0x539784
mov eax, ecx
mov ebx, 0x14d
cdq
idiv ebx
test edx, edx
jne 0x539784
fld qword [esp + 0x10]
fdiv qword [esp + 8]
fsubr qword [esp + 8]
fsub qword [esp + 0x10]
fadd qword [esp + 8]
fsub qword [esp + 0x10]
fstp qword [esp + 8]
wait
jmp 0x5397e2
imul eax, ecx, 0x6c
imul ecx
sub eax, 0x1d1
sub eax, ecx
mov ebx, 0x6c
cdq
idiv ebx
test edx, edx
jne 0x5397c8
fld qword [esp + 0x10]
fadd qword [esp + 8]
fstp qword [esp + 8]
wait
fld qword [esp + 0x10]
fdiv qword [esp + 8]
fsubr qword [esp + 8]
fsub qword [esp + 0x10]
fadd qword [esp + 8]
fsub qword [esp + 0x10]
fstp qword [esp + 0x10]
wait
jmp 0x5397e2
mov eax, ecx
imul ecx
add eax, ecx
add eax, 0x6c
mov ebx, 0x169
cdq
idiv ebx
test edx, edx
je 0x5397e2
mov ecx, 0x17
test ecx, ecx
jl 0x5397dd
cmp ecx, 5
mov ecx, 0x373
lea eax, [ecx + 0xf9]
mov ebx, 0x1dd
cdq
idiv ebx
test edx, edx
jne 0x53982d
mov eax, ecx
mov ebx, 0x1dd
cdq
idiv ebx
test edx, edx
jne 0x53982d
fld qword [esp + 0x10]
fdiv qword [esp + 8]
fsubr qword [esp + 8]
fsub qword [esp + 0x10]
fadd qword [esp + 8]
fsub qword [esp + 0x10]
fstp qword [esp + 8]
wait
jmp 0x539890
imul eax, ecx, 0x9b
imul ecx
sub eax, 0xf9
sub eax, ecx
mov ebx, 0x9b
cdq
idiv ebx
test edx, edx
jne 0x539874
fld qword [esp + 0x10]
fadd qword [esp + 8]
fstp qword [esp + 8]
wait
fld qword [esp + 0x10]
fdiv qword [esp + 8]
fsubr qword [esp + 8]
fsub qword [esp + 0x10]
fadd qword [esp + 8]
fsub qword [esp + 0x10]
fstp qword [esp + 0x10]
wait
jmp 0x539890
mov eax, ecx
imul ecx
add eax, ecx
add eax, 0x9b
mov ebx, 0x171
cdq
idiv ebx
test edx, edx
je 0x539890
mov ecx, 0x60
test ecx, ecx
jl 0x53988b
cmp ecx, 0x5e
mov ecx, 0x287
lea eax, [ecx + 0x1a1]
mov ebx, 0x1d4
cdq
idiv ebx
test edx, edx
jne 0x5398bc
mov eax, ecx
mov ebx, 0x1d4
cdq
idiv ebx
test edx, edx
je 0x5398ee
imul eax, ecx, 0x68
imul ecx
sub eax, 0x1a1
sub eax, ecx
mov ebx, 0x68
cdq
idiv ebx
test edx, edx
je 0x5398ee
mov eax, ecx
imul ecx
add eax, ecx
add eax, 0x68
mov ebx, 0x1bc
cdq
idiv ebx
test edx, edx
je 0x5398ee
mov ecx, 0x2b
test ecx, ecx
jl 0x5398e9
cmp ecx, 8
mov ebx, edi
mov eax, ebx
test eax, eax
je 0x539902
sub eax, 4
mov eax, dword [eax]
mov edx, ebp
xchg edx, eax
call fcn.0040ad58
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x18], 0
je 0x539922
mov eax, dword [esp + 0x18]
sub eax, 4
mov eax, dword [eax]
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x18]
test esi, esi
jle 0x53994b
mov ebx, 1
mov eax, ebp
call fcn.0040a6d0
movzx edx, word [edi + ebx*2 - 2]
movzx ecx, byte [esp]
xor dx, cx
mov word [eax + ebx*2 - 2], dx
inc ebx
dec esi
jne 0x53992f
add esp, 0x1c
pop ebp
pop edi
pop esi
pop ebx
ret