Function at 0x10040340
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10067185
mov eax, dword fs:[0]
push eax
sub esp, 0xbc
mov eax, dword [0x10078014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x15c]
cmp eax, dword [edi + 0x160]
je 0x10040cf9
mov ecx, dword [edi + 0x160]
sub ecx, eax
mov dword [ebp - 0x58], 0
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jle 0x100403e7
mov ebx, dword [ebp + 8]
xor esi, esi
xor ecx, ecx
nop dword [eax]
mov eax, dword [edi + 0x15c]
cmp dword [esi + eax + 0x18], ebx
je 0x100404c2
inc ecx
add esi, 0x68
mov dword [ebp - 0x58], ecx
mov ecx, dword [edi + 0x160]
sub ecx, eax
mov eax, 0x4ec4ec4f
imul ecx
mov ecx, dword [ebp - 0x58]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jl 0x100403b0
mov ecx, dword [edi + 0x148]
shl ecx, 2
mov dword [ebp - 0x74], ecx
lea eax, [ecx - 4]
mov dword [ebp - 0x5c], eax
cmp eax, ecx
jge 0x10040cf9
imul ebx, eax, 0x68
lea esi, [edi + 0xc]
nop word [eax + eax]
mov ecx, dword [edi + 0x160]
mov eax, 0x4ec4ec4f
sub ecx, dword [edi + 0x15c]
add esi, 0x18
imul ecx
mov dword [ebp - 0x58], esi
sar edx, 5
mov eax, edx
shr eax, 0x1f
dec eax
add eax, edx
cmp dword [ebp - 0x5c], eax
jg 0x10040cf9
mov eax, dword [edi + 0x15c]
lea ecx, [ebp - 0x28]
push 0xffffffffffffffff
add eax, ebx
mov dword [ebp - 0x70], 0xffc4fc03
push 0
push eax
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.10002480
mov dword [ebp - 4], 4
mov eax, dword [edi + 0x15c]
cmp byte [ebx + eax + 0x64], 2
jne 0x100409bf
movaps xmm0, xmmword [0x1006f710]
xor ecx, ecx
movups xmmword [ebp - 0x54], xmm0
mov dword [ebp - 0x44], 0x233e2b39
mov dword [ebp - 0x40], 0x172425
nop
mov al, byte [ebp - 0x54]
xor byte [ebp + ecx - 0x53], al
inc ecx
cmp ecx, 0x16
jb 0x100404a0
cmp byte [ebp - 0x53], 0
mov byte [ebp - 0x3d], 0
jne 0x10040997
xor ecx, ecx
jmp 0x100409a9
imul edx, ecx, 0x68
mov ebx, 4
mov ecx, eax
mov al, byte [ebp + 0xc]
mov dword [ebp - 0x70], edx
mov byte [edx + ecx + 0x64], al
lea esi, [edx + 0x58]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
sub eax, edx
mov dword [ebp + 0x10], eax
nop dword [eax]
nop dword [eax + eax]
mov ecx, dword [edi + 0x15c]
lea edx, [edx + 2]
movzx eax, word [eax + edx - 2]
lea esi, [esi + 2]
mov word [ecx + esi - 0xa], ax
mov ecx, dword [edi + 0x15c]
movzx eax, word [edx - 2]
mov word [esi + ecx - 2], ax
mov eax, dword [ebp + 0x10]
sub ebx, 1
jne 0x100404f0
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 0x144]
jne 0x100403e7
xor bl, bl
mov dword [ebp - 0x5c], 0xffffffff
mov byte [ebp - 0x29], bl
nop dword [eax + eax]
movzx ebx, bl
mov dword [ebp - 0x90], ebx
mov esi, dword [edi + ebx*4 + 0x84]
test esi, esi
je 0x1004097a
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004097a
push 4
add esi, 0xfc
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004097a
mov al, byte [esi]
test al, al
je 0x1004097a
mov eax, dword [edi + 0x15c]
mov ecx, dword [ebp - 0x70]
cmp byte [ecx + eax + 0x64], 2
jne 0x10040671
movaps xmm0, xmmword [0x10070160]
xor ecx, ecx
movups xmmword [ebp - 0x54], xmm0
mov dword [ebp - 0x44], 0x686e7366
mov word [ebp - 0x40], 0x5a69
mov byte [ebp - 0x3e], 0
nop dword [eax]
mov al, byte [ebp - 0x54]
xor byte [ebp + ecx - 0x53], al
inc ecx
cmp ecx, 0x15
jb 0x100405c0
cmp byte [ebp - 0x53], 0
mov byte [ebp - 0x3e], 0
mov dword [ebp - 0x78], 0xf
mov dword [ebp - 0x7c], 0
mov byte [ebp - 0x8c], 0
jne 0x100405f0
xor ecx, ecx
jmp 0x100405ff
lea ecx, [ebp - 0x53]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100405f6
sub ecx, edx
push ecx
lea eax, [ebp - 0x53]
push eax
lea ecx, [ebp - 0x8c]
call fcn.100028c0
mov dword [ebp - 4], 0
lea edx, [ebp - 0x8c]
mov ecx, dword [edi + 0x7c]
call fcn.10014f70
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x78]
cmp edx, 0x10
jb 0x10040644
mov ecx, dword [ebp - 0x8c]
inc edx
push 1
call fcn.10002790
add esp, 4
mov esi, dword [edi + 0x7c]
test esi, esi
je 0x10040665
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10040665
push 0xff5cb9fe
mov ecx, esi
call dword [0x1006ec54]
mov dword [ebp - 0x5c], 0xff808080
jmp 0x10040737
mov cl, 0x64
mov dword [ebp - 0x3c], 0xa313f64
mov dword [ebp - 0x38], 0x44160100
xor eax, eax
mov dword [ebp - 0x34], 0x391d0513
mov byte [ebp - 0x30], 0
nop
xor byte [ebp + eax - 0x3b], cl
inc eax
cmp eax, 0xb
jae 0x1004069f
mov cl, byte [ebp - 0x3c]
jmp 0x10040690
cmp byte [ebp - 0x3b], 0
mov byte [ebp - 0x30], 0
mov dword [ebp - 0x78], 0xf
mov dword [ebp - 0x7c], 0
mov byte [ebp - 0x8c], 0
jne 0x100406c2
xor ecx, ecx
jmp 0x100406d1
lea ecx, [ebp - 0x3b]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100406c8
sub ecx, edx
push ecx
lea eax, [ebp - 0x3b]
push eax
lea ecx, [ebp - 0x8c]
call fcn.100028c0
mov dword [ebp - 4], 1
lea edx, [ebp - 0x8c]
mov ecx, dword [edi + 0x7c]
call fcn.10014f70
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x78]
cmp edx, 0x10
jb 0x10040716
mov ecx, dword [ebp - 0x8c]
inc edx
push 1
call fcn.10002790
add esp, 4
mov esi, dword [edi + 0x7c]
test esi, esi
je 0x10040737
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10040737
push 0xffc4fc03
mov ecx, esi
call dword [0x1006ec54]
lea eax, [ebx + ebx*4]
mov esi, dword [edi + eax*4 + 0xb0]
mov dword [ebp - 0x74], eax
test esi, esi
je 0x10040760
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10040760
push dword [ebp - 0x5c]
mov ecx, esi
call dword [0x1006ec54]
imul edx, dword [ebp - 0x58], 0x34
mov eax, dword [edi + 0x15c]
lea ecx, [ebx + edx]
movzx eax, word [eax + ecx*2 + 0x58]
lea ecx, [ebx + edx]
push eax
mov eax, dword [edi + 0x15c]
mov bh, 0x64
xor dh, dh
mov dword [ebp - 0x94], ecx
mov dl, 0x44
mov bl, 0x4b
xor bl, bh
movzx eax, word [eax + ecx*2 + 0x50]
xor cl, cl
mov byte [ebp - 0x60], dh
xor cl, bh
push eax
mov ah, dl
mov byte [ebp - 0x68], bh
xor dl, bh
mov byte [ebp - 0x66], cl
mov byte [ebp - 0x65], dl
xor dh, bh
mov byte [ebp - 0x61], dh
mov al, 0x41
sub esp, 0x18
mov byte [ebp - 0x64], bl
mov edx, esp
mov byte [ebp - 0x60], 0
mov ch, al
xor ah, bh
mov byte [ebp - 0x63], ah
xor al, bh
mov byte [ebp - 0x67], al
xor ch, bh
mov byte [ebp - 0x62], ch
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x100407f0
mov eax, dword [edx]
jmp 0x100407f2
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x67], 0
jne 0x100407ff
xor ecx, ecx
jmp 0x1004080e
lea ecx, [ebp - 0x67]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10040805
sub ecx, esi
push ecx
lea eax, [ebp - 0x67]
mov ecx, edx
push eax
call fcn.100028c0
lea eax, [ebp - 0x8c]
push eax
call fcn.100061b0
add esp, 0x24
mov edx, eax
mov dword [ebp - 4], 2
cmp dword [edx + 0x14], 0x10
jb 0x1004083a
mov edx, dword [edx]
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
cmp byte [edx], 0
jne 0x10040855
xor ecx, ecx
jmp 0x10040869
mov ecx, edx
lea esi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10040860
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x54]
call fcn.100028c0
mov eax, dword [ebp - 0x90]
lea edx, [ebp - 0x54]
mov byte [ebp - 4], 3
lea ecx, [eax + eax*4]
mov ecx, dword [edi + ecx*4 + 0xb4]
call fcn.10014f70
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x40]
cmp eax, 0x10
jb 0x100408d9
mov ecx, dword [ebp - 0x54]
inc eax
cmp eax, 0x1000
jb 0x100408d0
test cl, 0x1f
jne 0x10040991
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x10040991
sub ecx, eax
cmp ecx, 4
jb 0x10040991
cmp ecx, 0x23
ja 0x10040991
mov ecx, eax
push ecx
call fcn.10063060
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
cmp eax, 0x10
jb 0x1004092f
mov ecx, dword [ebp - 0x8c]
inc eax
cmp eax, 0x1000
jb 0x10040926
test cl, 0x1f
jne 0x10040991
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x10040991
sub ecx, eax
cmp ecx, 4
jb 0x10040991
cmp ecx, 0x23
ja 0x10040991
mov ecx, eax
push ecx
call fcn.10063060
add esp, 4
mov ebx, dword [ebp - 0x74]
mov eax, dword [edi + 0x15c]
mov ecx, dword [ebp - 0x94]
mov ebx, dword [edi + ebx*4 + 0xb8]
movzx esi, word [eax + ecx*2 + 0x50]
test ebx, ebx
je 0x1004097a
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004097a
sub esp, 0xc
movd xmm0, esi
cvtdq2ps xmm0, xmm0
mov ecx, ebx
mov dword [esp + 8], eax
mov dword [esp + 4], eax
movss dword [esp], xmm0
call dword [0x1006ec38]
mov bl, byte [ebp - 0x29]
add bl, 1
mov byte [ebp - 0x29], bl
cmp bl, 4
jb 0x10040540
jmp 0x100403e7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
lea ecx, [ebp - 0x53]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100409a0
sub ecx, edx
push ecx
lea eax, [ebp - 0x53]
push eax
lea ecx, [ebp - 0x28]
call fcn.1000b4b0
mov dword [ebp - 0x70], 0xff5cb9fe
jmp 0x10040a19
mov cl, 0x75
mov dword [ebp - 0x3c], 0x202e5575
mov dword [ebp - 0x38], 0x710111b
xor eax, eax
mov dword [ebp - 0x34], 0xc140255
mov word [ebp - 0x30], 0x28
nop
xor byte [ebp + eax - 0x3b], cl
inc eax
cmp eax, 0xc
jae 0x100409ef
mov cl, byte [ebp - 0x3c]
jmp 0x100409e0
cmp byte [ebp - 0x3b], 0
mov byte [ebp - 0x2f], 0
jne 0x100409fd
xor ecx, ecx
jmp 0x10040a0c
lea ecx, [ebp - 0x3b]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10040a03
sub ecx, edx
push ecx
lea eax, [ebp - 0x3b]
push eax
lea ecx, [ebp - 0x28]
call fcn.1000b4b0
cmp dword [ebp - 0x14], 0x10
lea edx, [ebp - 0x28]
mov dword [ebp - 0x78], 0xf
cmovae edx, dword [ebp - 0x28]
mov dword [ebp - 0x7c], 0
mov byte [ebp - 0x8c], 0
cmp byte [edx], 0
jne 0x10040a42
xor ecx, ecx
jmp 0x10040a53
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10040a47
sub ecx, esi
mov esi, dword [ebp - 0x58]
push ecx
push edx
lea ecx, [ebp - 0x8c]
call fcn.100028c0
mov byte [ebp - 4], 5
lea edx, [ebp - 0x8c]
mov ecx, dword [esi]
call fcn.10014f70
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x78]
cmp edx, 0x10
jb 0x10040a8e
mov ecx, dword [ebp - 0x8c]
inc edx
push 1
call fcn.10002790
add esp, 4
mov esi, dword [esi]
test esi, esi
je 0x10040aac
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10040aac
push dword [ebp - 0x70]
mov ecx, esi
call dword [0x1006ec54]
mov eax, dword [edi + 0x15c]
xor ecx, ecx
movaps xmm0, xmmword [str.9uOU]
movzx eax, byte [ebx + eax + 0x62]
push eax
mov eax, dword [edi + 0x15c]
movzx eax, byte [ebx + eax + 0x61]
push eax
movups xmmword [ebp - 0x6c], xmm0
mov al, byte [ebp - 0x6c]
xor byte [ebp + ecx - 0x6b], al
inc ecx
cmp ecx, 0xe
jb 0x10040ad1
sub esp, 0x18
mov byte [ebp - 0x5d], 0
mov edx, esp
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x10040b0d
mov eax, dword [edx]
jmp 0x10040b0f
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x6b], 0
jne 0x10040b1c
xor ecx, ecx
jmp 0x10040b2b
lea ecx, [ebp - 0x6b]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10040b22
sub ecx, esi
push ecx
lea eax, [ebp - 0x6b]
mov ecx, edx
push eax
call fcn.100028c0
lea eax, [ebp - 0xc8]
push eax
call fcn.100061b0
add esp, 0x24
mov edx, eax
mov byte [ebp - 4], 6
cmp dword [edx + 0x14], 0x10
jb 0x10040b54
mov edx, dword [edx]
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
cmp byte [edx], 0
jne 0x10040b6f
xor ecx, ecx
jmp 0x10040b7d
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10040b74
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x54]
call fcn.100028c0
mov esi, dword [ebp - 0x58]
lea edx, [ebp - 0x54]
mov byte [ebp - 4], 7
mov ecx, dword [esi - 4]
call fcn.10014f70
mov edx, dword [ebp - 0x40]
cmp edx, 0x10
jb 0x10040baf
mov ecx, dword [ebp - 0x54]
inc edx
push 1
call fcn.10002790
add esp, 4
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0xb4]
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
cmp edx, 0x10
jb 0x10040be1
mov ecx, dword [ebp - 0xc8]
inc edx
push 1
call fcn.10002790
add esp, 4
mov eax, dword [edi + 0x15c]
lea ecx, [ebp - 0xc8]
movzx edx, byte [eax + ebx + 0x63]
call fcn.1003a0d0
mov edx, eax
mov byte [ebp - 4], 8
cmp dword [edx + 0x14], 0x10
jb 0x10040c05
mov edx, dword [edx]
mov dword [ebp - 0x9c], 0xf
mov dword [ebp - 0xa0], 0
mov byte [ebp - 0xb0], 0
cmp byte [edx], 0
jne 0x10040c29
xor ecx, ecx
jmp 0x10040c3c
mov ecx, edx
lea esi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10040c30
sub ecx, esi
mov esi, dword [ebp - 0x58]
push ecx
push edx
lea ecx, [ebp - 0xb0]
call fcn.100028c0
mov byte [ebp - 4], 9
lea edx, [ebp - 0xb0]
mov ecx, dword [esi + 8]
call fcn.10014f70
mov edx, dword [ebp - 0x9c]
cmp edx, 0x10
jb 0x10040c77
mov ecx, dword [ebp - 0xb0]
inc edx
push 1
call fcn.10002790
add esp, 4
mov edx, dword [ebp - 0xb4]
mov dword [ebp - 0x9c], 0xf
mov dword [ebp - 0xa0], 0
mov byte [ebp - 0xb0], 0
cmp edx, 0x10
jb 0x10040cae
mov ecx, dword [ebp - 0xc8]
inc edx
push 1
call fcn.10002790
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0xb4], 0xf
mov dword [ebp - 0xb8], 0
mov byte [ebp - 0xc8], 0
cmp edx, 0x10
jb 0x10040ce6
mov ecx, dword [ebp - 0x28]
inc edx
push 1
call fcn.10002790
add esp, 4
mov eax, dword [ebp - 0x5c]
add ebx, 0x68
inc eax
mov dword [ebp - 0x5c], eax
cmp eax, dword [ebp - 0x74]
jl 0x10040410
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10063065
mov esp, ebp
pop ebp
ret 0x10