Function at 0x10041960
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084026
mov eax, dword fs:[0]
push eax
sub esp, 0x98
mov eax, dword [0x100a2078]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x34], esi
cmp dword [0x100a55f0], 0
je 0x100420a2
push dword [ebp - 0x70]
mov edx, dword [esi + 0x160]
lea ebx, [esi + 0x15c]
push ecx
mov ecx, dword [ebx]
mov dword [ebp - 0x58], ebx
call fcn.10043320
mov eax, dword [ebx]
xor edi, edi
mov dword [ebx + 4], eax
add esp, 8
mov ecx, dword [esi + 0x154]
mov eax, 0x4ec4ec4f
sub ecx, dword [esi + 0x150]
mov ebx, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
imul ecx
mov dword [ebp - 0x30], edi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jle 0x10041b32
xor esi, esi
nop dword [eax]
nop dword [eax + eax]
mov edx, dword [ebp - 0x34]
mov ebx, dword [edx + 0x150]
cmp byte [esi + ebx + 0x63], 0
je 0x10041a76
cmp byte [0x100a5655], 0
mov eax, dword [0x100a55f0]
mov dword [ebp - 0x38], eax
je 0x10041a69
mov ecx, 0xd78c9c
call fcn.10017d30
mov edi, eax
test edi, edi
je 0x10041a60
push 4
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10041a60
push 4
add edi, 0xb7c
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
mov edx, dword [ebp - 0x34]
test eax, eax
jne 0x10041a63
mov ecx, dword [ebp - 0x38]
mov al, byte [edi]
mov byte [ecx + 0x3a], al
mov eax, ecx
jmp 0x10041a66
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp - 0x30]
mov al, byte [eax + 0x3a]
cmp byte [esi + ebx + 0x63], al
jne 0x10041afa
mov eax, dword [edx + 0x150]
mov dword [ebp - 0x54], eax
mov al, byte [esi + eax + 0x63]
cmp al, 1
je 0x10041a8b
cmp al, 2
jne 0x10041ae3
cmp byte [0x100a5655], 0
mov ebx, dword [0x100a55f0]
je 0x10041ad7
mov ecx, 0xd78c9c
call fcn.10017d30
mov edi, eax
test edi, edi
je 0x10041ad4
push 4
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10041ad4
push 4
add edi, 0x6a0
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
mov edx, dword [ebp - 0x34]
test eax, eax
jne 0x10041ad7
mov al, byte [edi]
mov byte [ebx + 0x34], al
jmp 0x10041ad7
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x54]
mov al, byte [ebx + 0x34]
cmp byte [esi + ecx + 0x63], al
jne 0x10041af7
mov eax, dword [edx + 0x150]
lea ecx, [edx + 0x15c]
add eax, esi
push eax
call fcn.10042d70
mov edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
inc edi
add esi, 0x68
mov dword [ebp - 0x30], edi
mov ecx, dword [eax + 0x154]
sub ecx, dword [eax + 0x150]
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jl 0x10041a00
mov ebx, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
mov esi, dword [ebp - 0x34]
mov eax, dword [esi + 0x15c]
cmp eax, dword [esi + 0x160]
jne 0x10041ba4
lea edi, [esi + 0xc]
mov ebx, 4
mov esi, dword [edi]
test esi, esi
je 0x10041b64
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10041b64
push eax
mov ecx, esi
call dword [0x100981e8]
add edi, 4
sub ebx, 1
jne 0x10041b48
mov ebx, dword [ebp - 0x34]
mov esi, dword [ebx + 0x134]
mov edi, dword [ebx + 0x148]
test esi, esi
je 0x10041b95
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10041b95
push edi
mov ecx, esi
call dword [0x10098248]
mov dword [ebx + 0x14c], 1
jmp 0x100420a2
mov ecx, dword [esi + 0x160]
sub esp, 8
sub ecx, eax
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100993c0]
mulsd xmm0, qword [0x10098840]
movsd qword [ebp - 0x74], xmm0
fld qword [ebp - 0x74]
fstp qword [esp]
call fcn.1007dbb0
add esp, 8
fstp qword [ebp - 0x74]
movsd xmm0, qword [ebp - 0x74]
call fcn.10043690
cvttsd2si eax, xmm0
mov dword [esi + 0x14c], eax
cmp dword [esi + 0x148], eax
jbe 0x10041c18
mov dword [esi + 0x148], 1
movzx eax, byte [ebp + 8]
lea ecx, [esi + 8]
shl eax, 2
or edx, 0xffffffff
mov dword [ebp - 0x78], eax
add eax, 0xfffffffc
imul edi, eax, 0x68
mov dword [ebp - 0x6c], eax
lea eax, [esi + 0xc]
mov dword [ebp - 0x54], edi
inc edx
add ecx, 4
add eax, 0x18
mov dword [ebp - 0x70], edx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x38], eax
cmp edx, 4
jg 0x10042075
mov esi, dword [ebp - 0x58]
mov eax, 0x4ec4ec4f
mov ecx, dword [esi + 4]
sub ecx, dword [esi]
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
dec eax
add eax, edx
cmp dword [ebp - 0x6c], eax
jle 0x10041c97
mov ecx, dword [ebp - 0x30]
mov esi, dword [ecx]
test esi, esi
je 0x10042059
push 4
push esi
call ebx
test eax, eax
jne 0x10042056
push eax
mov ecx, esi
call dword [0x100981e8]
jmp 0x10042056
mov eax, dword [esi]
lea ecx, [ebp - 0x2c]
mov esi, dword [ebp - 0x54]
mov edi, 0xffc4fc03
push 0xffffffffffffffff
add eax, esi
mov dword [ebp - 0x18], 0xf
push 0
push eax
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
call fcn.100022d0
mov eax, dword [ebp - 0x58]
mov dword [ebp - 4], 0
mov eax, dword [eax]
cmp byte [esi + eax + 0x64], 2
jne 0x10041d2e
movaps xmm0, xmmword [0x10099520]
xor ecx, ecx
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x40], 0x574a5f4d
mov dword [ebp - 0x3c], 0x635051
mov al, byte [ebp - 0x50]
xor byte [ebp + ecx - 0x4f], al
inc ecx
cmp ecx, 0x16
jb 0x10041cf0
cmp byte [ebp - 0x4f], 0
mov byte [ebp - 0x39], 0
jne 0x10041d0b
xor ecx, ecx
jmp 0x10041d1a
lea ecx, [ebp - 0x4f]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10041d11
sub ecx, edx
push ecx
lea eax, [ebp - 0x4f]
push eax
lea ecx, [ebp - 0x2c]
call fcn.10006860
mov edi, 0xff5cb9fe
jmp 0x10041d89
mov cl, 0x3f
mov dword [ebp - 0x68], 0x6a641f3f
mov dword [ebp - 0x64], 0x4d5a5b51
xor eax, eax
mov dword [ebp - 0x60], 0x465e481f
mov word [ebp - 0x5c], 0x62
nop dword [eax]
xor byte [ebp + eax - 0x67], cl
inc eax
cmp eax, 0xc
jae 0x10041d5f
mov cl, byte [ebp - 0x68]
jmp 0x10041d50
cmp byte [ebp - 0x67], 0
mov byte [ebp - 0x5b], 0
jne 0x10041d6d
xor ecx, ecx
jmp 0x10041d7c
lea ecx, [ebp - 0x67]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10041d73
sub ecx, edx
push ecx
lea eax, [ebp - 0x67]
push eax
lea ecx, [ebp - 0x2c]
call fcn.10006860
cmp dword [ebp - 0x18], 0x10
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x3c], 0xf
cmovae edx, dword [ebp - 0x2c]
mov dword [ebp - 0x40], 0
mov byte [ebp - 0x50], 0
cmp byte [edx], 0
jne 0x10041daf
xor ecx, ecx
jmp 0x10041dbd
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10041db4
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x50]
call fcn.10002710
mov esi, dword [ebp - 0x38]
lea edx, [ebp - 0x50]
mov byte [ebp - 4], 1
mov ecx, dword [esi]
call fcn.10017a20
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x3c]
cmp eax, 0x10
jb 0x10041df1
inc eax
lea ecx, [ebp - 0x50]
push eax
push dword [ebp - 0x50]
call fcn.100025f0
mov esi, dword [esi]
test esi, esi
je 0x10041e09
push 4
push esi
call ebx
test eax, eax
jne 0x10041e09
push edi
mov ecx, esi
call dword [0x1009824c]
mov eax, dword [ebp - 0x58]
mov edi, dword [ebp - 0x54]
movaps xmm0, xmmword [0x100988d0]
mov ecx, dword [eax]
movzx eax, byte [edi + ecx + 0x62]
push eax
movzx eax, byte [edi + ecx + 0x61]
xor ecx, ecx
push eax
movups xmmword [ebp - 0x88], xmm0
nop dword [eax]
mov al, byte [ebp - 0x88]
xor byte [ebp + ecx - 0x87], al
inc ecx
cmp ecx, 0xe
jb 0x10041e30
sub esp, 0x18
mov byte [ebp - 0x79], 0
mov edx, esp
mov dword [edx + 0x14], 0xf
mov dword [edx + 0x10], 0
cmp dword [edx + 0x14], 0x10
jb 0x10041e64
mov eax, dword [edx]
jmp 0x10041e66
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x87], 0
jne 0x10041e76
xor ecx, ecx
jmp 0x10041e89
lea ecx, [ebp - 0x87]
lea esi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10041e80
sub ecx, esi
push ecx
lea eax, [ebp - 0x87]
mov ecx, edx
push eax
call fcn.10002710
lea eax, [ebp - 0xa0]
push eax
call fcn.10027ec0
add esp, 0x24
mov edx, eax
mov byte [ebp - 4], 2
cmp dword [edx + 0x14], 0x10
jb 0x10041eb5
mov edx, dword [edx]
mov dword [ebp - 0x3c], 0xf
mov dword [ebp - 0x40], 0
mov byte [ebp - 0x50], 0
cmp byte [edx], 0
jne 0x10041ed0
xor ecx, ecx
jmp 0x10041ede
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10041ed5
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x50]
call fcn.10002710
mov esi, dword [ebp - 0x38]
lea edx, [ebp - 0x50]
mov byte [ebp - 4], 3
mov ecx, dword [esi - 4]
call fcn.10017a20
mov eax, dword [ebp - 0x3c]
cmp eax, 0x10
jb 0x10041f0f
inc eax
lea ecx, [ebp - 0x50]
push eax
push dword [ebp - 0x50]
call fcn.100025f0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x3c], 0xf
mov dword [ebp - 0x40], 0
mov byte [ebp - 0x50], 0
cmp eax, 0x10
jb 0x10041f43
inc eax
lea ecx, [ebp - 0xa0]
push eax
push dword [ebp - 0xa0]
call fcn.100025f0
mov eax, dword [ebp - 0x58]
lea ecx, [ebp - 0xa0]
mov eax, dword [eax]
movzx edx, byte [eax + edi + 0x63]
call fcn.1003c0e0
mov edx, eax
mov byte [ebp - 4], 4
cmp dword [edx + 0x14], 0x10
jb 0x10041f66
mov edx, dword [edx]
mov dword [ebp - 0x3c], 0xf
mov dword [ebp - 0x40], 0
mov byte [ebp - 0x50], 0
cmp byte [edx], 0
jne 0x10041f81
xor ecx, ecx
jmp 0x10041f92
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10041f86
sub ecx, esi
mov esi, dword [ebp - 0x38]
push ecx
push edx
lea ecx, [ebp - 0x50]
call fcn.10002710
mov byte [ebp - 4], 5
lea edx, [ebp - 0x50]
mov ecx, dword [esi + 8]
call fcn.10017a20
mov eax, dword [ebp - 0x3c]
cmp eax, 0x10
jb 0x10041fc0
inc eax
lea ecx, [ebp - 0x50]
push eax
push dword [ebp - 0x50]
call fcn.100025f0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x3c], 0xf
mov dword [ebp - 0x40], 0
mov byte [ebp - 0x50], 0
cmp eax, 0x10
jb 0x10041ff4
inc eax
lea ecx, [ebp - 0xa0]
push eax
push dword [ebp - 0xa0]
call fcn.100025f0
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x8c], 0xf
mov dword [ebp - 0x90], 0
mov eax, dword [eax]
mov byte [ebp - 0xa0], 0
mov eax, dword [edi + eax + 0x18]
mov dword [esi - 8], eax
mov esi, dword [ecx]
test esi, esi
je 0x1004203a
push 4
push esi
call ebx
test eax, eax
jne 0x10042037
push 1
mov ecx, esi
call dword [0x100981e8]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x10042059
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.100025f0
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x6c]
add edi, 0x68
mov edx, dword [ebp - 0x70]
inc eax
cmp eax, dword [ebp - 0x78]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x54], edi
jl 0x10041c37
mov esi, dword [ebp - 0x34]
mov edi, dword [esi + 0x148]
mov esi, dword [esi + 0x134]
test esi, esi
je 0x1004209a
push 4
push esi
call ebx
test eax, eax
jne 0x1004209a
push edi
mov ecx, esi
call dword [0x10098248]
mov ecx, dword [ebp - 0x34]
call fcn.10041330
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10066135
mov esp, ebp
pop ebp
ret 4