Function at 0x10040863
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x100622a0
call fcn.10060508
sub esp, 0x104
cmp byte [ebp + 0x10], 0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
je 0x10040ea4
mov ecx, dword [ebp + 0x18]
mov eax, dword [ecx]
cmp eax, dword [ecx + 4]
je 0x10040e99
lea eax, [ebp - 0x48]
xor ebx, ebx
push eax
push 0x1000
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
call fcn.100364be
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x58]
sub eax, dword [ebp - 0x5c]
push dword [ebp - 0x5c]
sar eax, 1
push eax
push 0x160c
push 0x2d47
call fcn.1001b736
pop ecx
pop ecx
call eax
mov dword [ebp - 0x20], 0x660a
cmp dword [ebp - 0x20], 0x6997
jle 0x1004091d
mov esi, ebx
mov edi, ebx
mov dword [ebp - 0x48], ebx
mov eax, edi
mov ecx, 0x1007c858
cdq
idiv ebx
xor edx, esi
mov eax, edx
cdq
push edx
push eax
call fcn.10004668
inc ebx
cmp ebx, 0x2c8d
jl 0x100408e9
inc edi
push 0
pop ebx
cmp edi, 0x272e
jl 0x100408e6
inc esi
cmp esi, 0x2f88
jl 0x100408e4
push dword [ebp - 0x5c]
lea ecx, [ebp - 0x94]
call fcn.1000477d
mov byte [ebp - 4], 2
cmp dword [ebp - 0x20], 0x6449
jge 0x10040965
mov edx, str.mkye_uosxg_deilu_bnr_spkeqljjr_dklgmv
mov ecx, 0x1007c858
call fcn.10006b3c
jmp 0x10040965
push 0x349d
mov dword [ebp - 4], 1
call fcn.10036011
push 1
movzx eax, ax
lea edx, [ebp - 0x64]
mov dword [ebp - 0x64], eax
mov ecx, 0x4518
lea eax, [ebp - 0x94]
push eax
push 0x1191
push 0x7d5c
push 0x7954
push 0x3c2b
push 1
push 1
call fcn.1003e76e
add esp, 0x24
lea eax, [ebp - 0x94]
push 1
push ecx
push ecx
push eax
push 0x56ec
mov ecx, 0x628b
call fcn.1003feb1
add esp, 0x14
lea eax, [ebp - 0x94]
cmp dword [ebp - 0x80], 8
cmovae eax, dword [ebp - 0x94]
push ebx
push eax
push 0x160c
push 0x14d3
call fcn.1001b736
pop ecx
pop ecx
call eax
push 1
push 0x21ab
lea eax, [ebp - 0x94]
mov cl, 1
push eax
push 1
push 0x3f6f
push 0x1348
lea edx, [ebp - 0x64]
call fcn.1003ff58
push dword [ebp + 0x18]
lea eax, [ebp - 0x60]
mov dword [ebp - 0x60], ebx
push 0x287
push 1
push eax
push 0x7a19
push 0x11f8
push 1
mov edx, 0xa01
mov ecx, 0x7f38
call fcn.1003ee17
add esp, 0x34
mov byte [ebp - 0x11], bl
mov dword [ebp - 0x20], ebx
mov word [ebp - 0x30], 0x501
mov byte [ebp - 0x2e], 3
push 0x22
pop eax
mov byte [ebp - 0x2d], bl
mov word [ebp - 0x2c], 0xed02
mov byte [ebp - 0x2a], al
mov byte [ebp - 0x29], bl
mov word [ebp - 0x28], 0x24b
mov byte [ebp - 0x26], 0x56
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0xac]
call fcn.100078fc
push 0x10
pop edx
lea ecx, [ebp - 0x110]
mov byte [ebp - 4], 4
call fcn.1003759f
push 1
push 0xe55
push 1
push 0x4aa7
lea eax, [ebp - 0xac]
mov byte [ebp - 4], 5
push eax
push 0x62f0
push 0x5aba
mov edx, 0x7187
lea ecx, [ebp - 0x110]
call fcn.1004006e
add esp, 0x1c
mov ecx, ebx
mov dword [ebp - 0x50], ecx
push 0x65
pop eax
push 2
mov word [ebp - 0x6e], ax
pop esi
cmp esi, 4
jne 0x10040ae8
push 3
pop ecx
push 5
mov dword [ebp - 0x50], ecx
pop esi
jmp 0x10040b30
movzx edx, byte [ebp + esi - 0x2f]
mov eax, esi
sub eax, ecx
push 0x5b87
push 0x6bd3
movzx eax, byte [ebp + eax - 0x32]
movzx ecx, word [ebp + eax*2 - 0x70]
mov eax, ecx
and eax, edx
add eax, eax
sub ecx, eax
movzx eax, byte [ebp + esi - 0x30]
add ecx, edx
mov dl, 1
push ecx
mov word [ebp + eax*2 - 0x70], cx
lea eax, [ebp - 0x50]
push eax
push 0x2740
call fcn.1003fb9b
mov ecx, dword [ebp - 0x50]
add esp, 0x14
add esi, 2
cmp esi, 0xb
jb 0x10040ad8
xor eax, eax
mov dword [ebp - 0xc8], 7
mov word [ebp - 0x68], ax
lea ecx, [ebp - 0xdc]
mov word [ebp - 0xdc], ax
lea eax, [ebp - 0x70]
push eax
mov dword [ebp - 0xcc], ebx
call fcn.10004db8
push ecx
push ecx
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0xac]
call fcn.1003c91c
push ebx
push 1
lea ecx, [ebp - 0xdc]
mov byte [ebp - 4], 5
call fcn.10004e40
xor eax, eax
lea edi, [ebp - 0x70]
cmp dword [ebp - 0x98], 8
stosd dword es:[edi], eax
push ebx
push 0x80
push 2
stosd dword es:[edi], eax
push ebx
push ebx
push 0x40000000
stosw word es:[edi], ax
lea eax, [ebp - 0xac]
cmovae eax, dword [ebp - 0xac]
push eax
push 0x160c
push 0x19b7
call fcn.1001b736
pop ecx
pop ecx
call eax
mov esi, eax
cmp esi, 0xffffffff
je 0x10040c18
push ebx
lea eax, [ebp - 0xf8]
push eax
push dword [ebp - 0x60]
mov eax, dword [ebp + 0x18]
push dword [eax]
push esi
push 0x160c
push 0x272a
call fcn.1001b736
pop ecx
pop ecx
call eax
push esi
test eax, eax
push 0x160c
push 0x3848
setne bl
call fcn.1001b736
pop ecx
pop ecx
call eax
test bl, bl
jne 0x10040c59
xor ebx, ebx
push ebx
push 1
lea ecx, [ebp - 0x110]
call fcn.10004e40
push ebx
push 1
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 1
call fcn.10004e40
mov edi, dword [ebp - 0x20]
inc edi
mov dword [ebp - 0x20], edi
cmp edi, 0x12c
jb 0x10040a6f
mov eax, dword [ebp + 0xc]
mov dword [eax], 2
jmp 0x10040e81
push 0x22
pop eax
xor ebx, ebx
mov dword [ebp - 0x1c], 0x86032c00
push 2
mov ecx, ebx
mov word [ebp - 0x18], 0xf24a
mov word [ebp - 0x24], ax
pop esi
mov dword [ebp - 0x4c], ecx
cmp esi, 2
jne 0x10040c86
push 4
pop ecx
push ecx
mov dword [ebp - 0x4c], ecx
pop esi
jmp 0x10040cd9
movzx edx, byte [ebp + esi - 0x1b]
mov eax, esi
sub eax, ecx
push 1
push 0x10c3
push 1
movzx eax, byte [ebp + eax - 0x1e]
push 1
push 0x3ba0
push 0x6902
movzx eax, word [ebp + eax*2 - 0x24]
mov ecx, eax
and eax, edx
or ecx, edx
mov edx, 0x6410
sub ecx, eax
movzx eax, byte [ebp + esi - 0x1c]
mov word [ebp + eax*2 - 0x24], cx
lea eax, [ebp - 0x4c]
push eax
mov ecx, 0x29a1
call fcn.10040276
mov ecx, dword [ebp - 0x4c]
add esp, 0x1c
add esi, 2
cmp esi, 6
jb 0x10040c77
xor eax, eax
mov dword [ebp - 0xb0], 7
mov word [ebp - 0x22], ax
lea ecx, [ebp - 0xc4]
mov word [ebp - 0xc4], ax
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0xb4], ebx
call fcn.10004db8
push ecx
push ecx
lea eax, [ebp - 0xac]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0xc4]
mov dword [ebp - 0x24], ebx
call fcn.1003c91c
push 0x2f
pop eax
push 2
mov ecx, ebx
mov dword [ebp - 0x40], 0xf01b302
mov dword [ebp - 0x3c], 0x1c040200
mov dword [ebp - 0x38], 0x3661543
mov byte [ebp - 0x34], 0x71
mov word [ebp - 0x78], ax
pop esi
mov dword [ebp - 0x44], ecx
cmp esi, 6
jne 0x10040d60
push 5
pop ecx
push 9
mov dword [ebp - 0x44], ecx
pop esi
jmp 0x10040daf
movzx edx, byte [ebp + esi - 0x3f]
mov eax, esi
sub eax, ecx
push 0x4790
push 0x4d90
push ebx
movzx eax, byte [ebp + eax - 0x42]
push 0x912
push 1
push 0x67ff
movzx eax, word [ebp + eax*2 - 0x7c]
mov ecx, eax
and eax, edx
or ecx, edx
lea edx, [ebp - 0x44]
sub ecx, eax
movzx eax, byte [ebp + esi - 0x40]
mov word [ebp + eax*2 - 0x7c], cx
mov ecx, 0x290e
call fcn.1004067a
mov ecx, dword [ebp - 0x44]
add esp, 0x18
add esi, 2
cmp esi, 0xd
jb 0x10040d50
xor eax, eax
mov dword [ebp - 0xe0], 7
mov word [ebp - 0x74], ax
lea ecx, [ebp - 0xf4]
mov word [ebp - 0xf4], ax
lea eax, [ebp - 0x7c]
push eax
mov dword [ebp - 0xe4], ebx
call fcn.10004db8
push ecx
push ecx
lea eax, [ebp - 0xf4]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0xc4]
call fcn.1003c91c
push ebx
push 1
lea ecx, [ebp - 0xf4]
mov byte [ebp - 4], 7
call fcn.10004e40
xor eax, eax
lea edi, [ebp - 0x7c]
stosd dword es:[edi], eax
mov edx, 0x528a
push 1
push 0x50e5
push 1
stosd dword es:[edi], eax
mov ecx, 0x572b
stosw word es:[edi], ax
lea eax, [ebp - 0x11]
push eax
push 0x28b4
push 1
push 0x15e6
call fcn.10040398
add esp, 0x1c
lea edx, [ebp - 0x94]
lea ecx, [ebp - 0xc4]
call fcn.1003dfa0
mov ecx, dword [ebp + 0xc]
push ebx
push 1
mov dword [ecx], eax
lea ecx, [ebp - 0xc4]
call fcn.10004e40
push ebx
push 1
lea ecx, [ebp - 0x110]
call fcn.10004e40
push ebx
push 1
lea ecx, [ebp - 0xac]
call fcn.10004e40
push ebx
push 1
lea ecx, [ebp - 0x94]
call fcn.10004e40
lea ecx, [ebp - 0x5c]
call fcn.10004ff6
jmp 0x10040ec4
mov eax, dword [ebp + 0xc]
mov dword [eax], 1
jmp 0x10040ec4
mov dword [edx], 0
cmp dword [edx], 2
jge 0x10040ec4
mov esi, dword [ebp + 0x14]
mov ecx, dword [edx]
mov eax, dword [esi]
mov dword [eax + ecx*4], 0x7b187b35
inc dword [edx]
cmp dword [edx], 2
jl 0x10040eb2
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret