Function at 0x10031157
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x10062a53
call fcn.100615d8
sub esp, 0xb4
cmp byte [ebp + 0x10], 0
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x30], edi
je 0x10031530
cmp byte [ebp + 0xc], 0
je 0x1003142a
mov dword [ebp - 0x14], 0x317d
xor ebx, ebx
cmp dword [ebp - 0x14], 0x3194
jle 0x100311e1
mov esi, ebx
mov edi, ebx
lea eax, [edi + esi]
cdq
lea ecx, [ebp - 0xc0]
push edx
push eax
call fcn.10001a6a
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x100311b7
mov eax, dword [eax]
push eax
call fcn.1004a873
pop ecx
push ebx
push 1
lea ecx, [ebp - 0xc0]
call fcn.10003d33
inc edi
cmp edi, 0x224c
jl 0x1003119c
inc esi
cmp esi, 0x564f
jl 0x1003119a
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 4], ebx
cmp dword [edi + 0x10], ebx
je 0x10031411
push 0x2e
pop eax
push 2
mov ecx, ebx
mov dword [ebp - 0x1c], 0xd021200
mov byte [ebp - 0x18], 0xe0
mov word [ebp + 0x10], ax
pop esi
mov dword [ebp - 0x3c], ecx
cmp esi, 2
jne 0x1003121f
push 3
pop ecx
push ecx
mov dword [ebp - 0x3c], ecx
pop esi
jmp 0x10031267
movzx edx, byte [ebp + esi - 0x1b]
mov eax, esi
sub eax, ecx
movzx eax, byte [ebp + eax - 0x1e]
movzx ecx, word [ebp + eax*2 + 0x10]
mov eax, ecx
and eax, edx
add eax, eax
sub ecx, eax
movzx eax, byte [ebp + esi - 0x1c]
add ecx, edx
push ecx
mov word [ebp + eax*2 + 0x10], cx
lea eax, [ebp - 0x3c]
push eax
push 0x1fcc
push 0x2b41
push 0x480
mov cl, 1
call fcn.10030820
mov ecx, dword [ebp - 0x3c]
add esp, 0x14
add esi, 2
cmp esi, 5
jb 0x10031210
xor eax, eax
mov dword [ebp - 0x70], 7
mov word [ebp + 0x12], ax
lea ecx, [ebp - 0x84]
mov word [ebp - 0x84], ax
lea eax, [ebp + 0x10]
push eax
mov dword [ebp - 0x74], ebx
call fcn.1000c006
lea eax, [ebp - 0x84]
mov byte [ebp - 4], 1
push eax
mov edx, edi
lea ecx, [ebp - 0x48]
call fcn.10030156
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 3
call fcn.1000400a
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0x48]
push 0x18
cdq
pop ecx
idiv ecx
mov dword [ebp + 0x10], ebx
test eax, eax
jne 0x100313d3
push 0x2d
pop eax
push 2
mov ecx, ebx
mov dword [ebp - 0x2c], 0x23041600
mov word [ebp - 0x28], 0x11ec
mov byte [ebp - 0x26], 0xd1
mov word [ebp - 0x34], ax
pop esi
mov dword [ebp - 0x38], ecx
cmp esi, 2
jne 0x10031303
push 5
pop ecx
push ecx
mov dword [ebp - 0x38], ecx
pop esi
jmp 0x10031340
movzx edx, byte [ebp + esi - 0x2b]
mov eax, esi
sub eax, ecx
movzx eax, byte [ebp + eax - 0x2e]
movzx eax, word [ebp + eax*2 - 0x34]
mov ecx, eax
and eax, edx
or ecx, edx
mov edx, 0x5bac
sub ecx, eax
movzx eax, byte [ebp + esi - 0x2c]
push ecx
mov word [ebp + eax*2 - 0x34], cx
lea eax, [ebp - 0x38]
push eax
push ecx
push 1
call fcn.10031026
mov ecx, dword [ebp - 0x38]
add esp, 0x10
add esi, 2
cmp esi, 7
jb 0x100312f4
xor eax, eax
mov dword [ebp - 0x88], 7
mov word [ebp - 0x32], ax
lea ecx, [ebp - 0x9c]
mov word [ebp - 0x9c], ax
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x8c], ebx
call fcn.1000c006
lea eax, [ebp - 0x9c]
mov byte [ebp - 4], 4
push eax
mov edx, edi
lea ecx, [ebp - 0xa8]
call fcn.10030156
pop ecx
mov esi, eax
lea eax, [ebp - 0x48]
cmp eax, esi
je 0x100313b6
mov ecx, eax
call fcn.100350f7
mov ecx, dword [esi]
mov dword [ebp - 0x48], ecx
mov eax, dword [esi + 4]
mov dword [ebp - 0x44], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x40], eax
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
lea ecx, [ebp - 0xa8]
call fcn.100350f7
push ebx
push 1
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 3
call fcn.1000400a
push 0x2e10
lea eax, [ebp - 0x68]
mov edx, 0x65a4
push eax
push 0x2179
push 0x4376
lea eax, [ebp - 0x48]
mov cl, 1
push eax
push 0x38f5
push ebx
push 1
push 0x519d
call fcn.10031c73
add esp, 0x24
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x48]
call fcn.100350f7
mov ecx, dword [ebp + 0x1c]
lea eax, [ebp - 0x68]
push eax
call fcn.10034f53
lea ecx, [ebp - 0x68]
call fcn.100351d0
jmp 0x1003169d
mov dword [ebp - 0x14], 0x14fe
cmp dword [ebp - 0x14], 0xe6b
jge 0x100314ab
push 3
lea ecx, [ebp - 0x5c]
call fcn.1000bebd
mov dword [ebp - 4], 8
mov ebx, dword [ebp - 0x5c]
lea esi, [ebx + 8]
push esi
lea edi, [ebx + 4]
push edi
push ebx
push str._ld__ld__ld
call fcn.1004ab32
mov edx, dword [ebp - 0x58]
mov ecx, ebx
mov eax, edx
mov byte [ebp - 0x4c], 0
push dword [ebp - 0x4c]
sub eax, ebx
sar eax, 2
push eax
call fcn.1002d6cd
mov eax, dword [esi]
sub eax, dword [edi]
sub eax, dword [ebx]
push 0
pop ecx
inc eax
cmovs eax, ecx
push eax
push str._ld_n
call fcn.1004a873
or dword [ebp - 4], 0xffffffff
push ebx
call fcn.1004aa49
and dword [ebp - 0x5c], 0
add esp, 0x24
and dword [ebp - 0x58], 0
and dword [ebp - 0x54], 0
mov esi, dword [ebp + 0x30]
mov dword [esi], 3
cmp dword [esi], 0
jl 0x1003169d
mov edi, dword [ebp + 0x34]
xor edx, edx
mov ebx, dword [ebp + 0x24]
inc edx
mov dword [ebp - 0x6c], 0x2cf3e4c9
xor ecx, ecx
mov eax, dword [edi]
cmp eax, edx
mov eax, dword [ebp + 0x14]
setne cl
push ecx
push 0
mov dword [eax], ecx
mov eax, dword [eax]
mov eax, dword [esi]
mov eax, dword [edi]
mov eax, dword [esi]
mov eax, dword [esi]
mov eax, dword [edi]
mov eax, dword [edi]
mov eax, dword [edi]
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
mov eax, dword [eax]
mov eax, dword [edi]
mov dword [ebx], 0x9e62b560
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x14], edx
lea edx, [ebp - 0x50]
mov dword [ebp - 0x50], 0xac3e
call fcn.1003304e
cmp dword [ebx], 0
pop ecx
pop ecx
jne 0x1003169d
dec dword [esi]
cmp dword [esi], 0
push 1
pop edx
jge 0x100314c6
jmp 0x1003169d
cmp byte [ebp + 0x3c], 0
je 0x100315fa
mov dword [ebp - 0x24], 0x31e1
cmp dword [ebp - 0x24], 0x3338
jle 0x10031598
xor esi, esi
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x20], 0x112b
mov eax, esi
mov ecx, 0x1007dbf8
xor eax, ebx
cdq
push edx
push eax
call fcn.100036f4
add ebx, edi
dec dword [ebp - 0x20]
jne 0x10031557
inc edi
cmp edi, 0x31d2
jl 0x1003154e
inc esi
cmp esi, 0x352a
jl 0x1003154c
push 0xc08
push 0x1b85
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_SetWindowLongW]
mov dword [ebp - 4], 0xb
cmp dword [ebp - 0x24], 0x3153
jge 0x100315b7
mov edx, str.inrsncsdw_nwjg_aszputevg_lwxbax_fokory_gyakhutqp_whym_siocmlhy_hdu_kxwukkxc
mov ecx, 0x1007dbf8
call fcn.10007689
mov edx, dword [ebp + 0x28]
mov dword [edx], 0
cmp dword [edx], 1
jge 0x1003169d
mov esi, dword [ebp + 0x38]
mov ecx, dword [edx]
mov eax, dword [esi]
and dword [eax + ecx*4], 0
inc dword [edx]
cmp dword [edx], 1
jl 0x100315cc
jmp 0x1003169d
mov dword [ebp - 0x14], 0x788a
cmp dword [ebp - 0x14], 0x7a47
jle 0x1003165e
xor esi, esi
mov dword [ebp - 0x30], esi
xor ebx, ebx
mov dword [ebp - 0x20], 0x4f6e
xor edi, edi
mov dword [ebp - 0x24], edi
mov esi, edi
mov edi, 0x2fc6
mov eax, ebx
mov ecx, 0x1007dbf8
xor eax, esi
cdq
push edx
push eax
call fcn.100036f4
dec esi
dec edi
jne 0x10031624
mov edi, dword [ebp - 0x24]
inc edi
mov dword [ebp - 0x24], edi
cmp edi, 0x644a
jl 0x1003161d
mov esi, dword [ebp - 0x30]
add ebx, esi
dec dword [ebp - 0x20]
jne 0x10031618
inc esi
mov dword [ebp - 0x30], esi
cmp esi, 0x4d58
jl 0x1003160f
mov dword [ebp - 4], 0xd
cmp dword [ebp - 0x14], 0x766f
jge 0x1003167d
mov edx, str.pfrl_bmlcf_lyxea_fzwtgyr_exnyehvwv_vycs_mjtntz_dqyr_patalp_fjrmu
mov ecx, 0x1007dbf8
call fcn.10007689
mov edx, dword [ebp + 0x20]
mov dword [edx], 0
cmp dword [edx], 1
jge 0x1003169d
mov esi, dword [ebp + 8]
mov ecx, dword [edx]
mov eax, dword [esi]
and dword [eax + ecx*4], 0
inc dword [edx]
cmp dword [edx], 1
jl 0x1003168e
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret