Function at 0x10041320
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [ebp + 0x10]
push ebx
lea edx, [eax + 0x87]
push esi
mov ecx, eax
mov dword [ebp - 0xc], edx
cmp eax, edx
mov edx, dword [ebp + 0x10]
push edi
mov dword [ebp - 8], ecx
ja 0x1004195f
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x10]
mov edi, edi
cmp ecx, 0x4a6c
ja 0x100414bb
je 0x100414b3
cmp ecx, 0x4a30
ja 0x1004141e
je 0x10041416
cmp ecx, 0x1adf
ja 0x10041405
je 0x100413e7
mov eax, ecx
sub eax, 0xbd2
je 0x100413ca
sub eax, 0xf
jne 0x1004194d
mov eax, dword [ebp + 8]
cmp dword [eax + 0x20], 0
jne 0x100413b8
cmp dword [eax + 0x2c], 0
jbe 0x100413b8
mov ecx, dword [eax + 0x1c]
push 0
push ecx
push 0x5b64
push 0
call fcn.10040220
add esp, 0x10
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp + 0x10]
jmp 0x1004194d
js 0x10041423
jbe 0x10041401
std
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
dec dword [eax + 0x20]
mov edx, dword [ebp + 0x10]
jmp 0x1004194d
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
cmp eax, 0x41
jl 0x100413fb
cmp eax, 0x5a
jg 0x100413fb
add eax, 0x20
mov dword [ecx], eax
mov edx, dword [ecx]
mov dword [ebp + 0x10], edx
jmp 0x1004194d
dec eax
add eax, 0xf9810000
out dx, al
sbb al, byte [eax]
add byte [edi], cl
test byte [esi + 5], cl
add byte [eax], al
cmp ecx, 0x1aee
je 0x1004195f
jmp 0x1004194d
mov esi, dword [ebp + 0x10]
jmp 0x1004194d
mov eax, ecx
sub eax, 0x4a3f
add byte [eax], al
je 0x10041484
sub eax, 0xf
je 0x1004143d
sub eax, 0xf
jne 0x1004194d
mov esi, dword [ebp + 0xc]
jmp 0x1004194d
cmp dword [ebx], 0
not edi
je 0x1004194d
jmp 0x10041450
test byte [ebp + 0xc], 3
je 0x1004194d
mov eax, dword [ebp + 0xc]
movzx edx, byte [eax]
mov ecx, edi
shr ecx, 0x18
xor ecx, edx
mov edx, dword [ebp + 0x10]
shl edi, 8
xor edi, dword [ecx*4 + 0x1007b158]
dec dword [ebx]
inc eax
cmp dword [ebx], 0
mov dword [ebp + 0xc], eax
jne 0x10041450
jmp 0x1004194d
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edi, eax
mov ecx, eax
shl edi, 0x10
and ecx, 0xff00
add edi, ecx
shr eax, 8
and eax, 0xff00
shl edi, 8
add edi, eax
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 3]
add edi, ecx
jmp 0x1004194d
sub esi, 4
jmp 0x1004194d
cmp ecx, 0x4fc8
ja 0x1004180f
je 0x1004194d
cmp ecx, 0x4a99
ja 0x1004194d
je 0x10041785
mov eax, ecx
sub eax, 0x4a7b
je 0x100414f6
sub eax, 0xf
je 0x100417d9
jmp 0x1004194d
cmp dword [ebx], 0x20
jb 0x10041708
nop
xor edi, dword [esi + 4]
mov eax, edi
mov ecx, edi
shr eax, 0x10
shr ecx, 8
and ecx, 0xff
and eax, 0xff
mov eax, dword [eax*4 + 0x1007b958]
xor eax, dword [ecx*4 + 0x1007b558]
mov ecx, edi
shr ecx, 0x18
xor eax, dword [ecx*4 + 0x1007bd58]
and edi, 0xff
xor eax, dword [edi*4 + 0x1007b158]
xor eax, dword [esi + 8]
mov ecx, eax
shr ecx, 0x10
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x1007b958]
mov edi, eax
shr edi, 8
and edi, 0xff
xor ecx, dword [edi*4 + 0x1007b558]
mov edi, eax
shr edi, 0x18
xor ecx, dword [edi*4 + 0x1007bd58]
and eax, 0xff
xor ecx, dword [eax*4 + 0x1007b158]
xor ecx, dword [esi + 0xc]
mov eax, ecx
shr eax, 0x10
mov edi, ecx
shr edi, 8
and edi, 0xff
and eax, 0xff
mov eax, dword [eax*4 + 0x1007b958]
xor eax, dword [edi*4 + 0x1007b558]
mov edi, ecx
shr edi, 0x18
xor eax, dword [edi*4 + 0x1007bd58]
and ecx, 0xff
xor eax, dword [ecx*4 + 0x1007b158]
xor eax, dword [esi + 0x10]
mov ecx, eax
shr ecx, 0x10
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x1007b958]
mov edi, eax
shr edi, 8
and edi, 0xff
xor ecx, dword [edi*4 + 0x1007b558]
mov edi, eax
shr edi, 0x18
xor ecx, dword [edi*4 + 0x1007bd58]
and eax, 0xff
xor ecx, dword [eax*4 + 0x1007b158]
xor ecx, dword [esi + 0x14]
mov eax, ecx
shr eax, 0x10
mov edi, ecx
shr edi, 8
and eax, 0xff
mov eax, dword [eax*4 + 0x1007b958]
and edi, 0xff
xor eax, dword [edi*4 + 0x1007b558]
mov edi, ecx
shr edi, 0x18
xor eax, dword [edi*4 + 0x1007bd58]
and ecx, 0xff
xor eax, dword [ecx*4 + 0x1007b158]
xor eax, dword [esi + 0x18]
mov ecx, eax
shr ecx, 0x10
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x1007b958]
mov edi, eax
shr edi, 8
and edi, 0xff
xor ecx, dword [edi*4 + 0x1007b558]
mov edi, eax
shr edi, 0x18
xor ecx, dword [edi*4 + 0x1007bd58]
and eax, 0xff
xor ecx, dword [eax*4 + 0x1007b158]
add esi, 0x20
xor ecx, dword [esi - 4]
mov eax, ecx
mov edi, ecx
shr eax, 0x10
shr edi, 8
and edi, 0xff
and eax, 0xff
mov eax, dword [eax*4 + 0x1007b958]
xor eax, dword [edi*4 + 0x1007b558]
mov edi, ecx
shr edi, 0x18
xor eax, dword [edi*4 + 0x1007bd58]
and ecx, 0xff
xor eax, dword [ecx*4 + 0x1007b158]
xor eax, dword [esi]
mov ecx, eax
shr ecx, 0x10
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x1007b958]
mov edi, eax
shr edi, 8
and edi, 0xff
xor ecx, dword [edi*4 + 0x1007b558]
mov edi, eax
shr edi, 0x18
xor ecx, dword [edi*4 + 0x1007bd58]
and eax, 0xff
xor ecx, dword [eax*4 + 0x1007b158]
add dword [ebx], 0xffffffe0
cmp dword [ebx], 0x20
mov edi, ecx
jae 0x10041500
cmp dword [ebx], 4
jb 0x1004194d
mov ecx, 0x47fd
mov eax, ecx
sub eax, 0x47fd
je 0x10041729
sub eax, 0x60
jne 0x10041770
add dword [ebx], 0xfffffffc
jmp 0x10041770
xor edi, dword [esi + 4]
add esi, 4
mov edx, edi
shr edx, 0x10
and edx, 0xff
mov edx, dword [edx*4 + 0x1007b958]
mov eax, edi
shr eax, 8
and eax, 0xff
xor edx, dword [eax*4 + 0x1007b558]
mov eax, edi
shr eax, 0x18
xor edx, dword [eax*4 + 0x1007bd58]
and edi, 0xff
xor edx, dword [edi*4 + 0x1007b158]
mov edi, edx
mov edx, dword [ebp + 0x10]
add ecx, 0x60
cmp ecx, 0x485d
jbe 0x10041716
cmp dword [ebx], 4
jae 0x10041711
jmp 0x1004194d
mov ecx, 0x4d78
lea ebx, [ebx]
mov eax, ecx
sub eax, 0x4d78
je 0x100417a4
sub eax, 0x2c
je 0x1004195f
jmp 0x100417ce
not edi
mov edx, edi
and edx, 0xff00
mov eax, edi
shl eax, 0x10
add edx, eax
mov eax, edi
shr eax, 8
and eax, 0xff00
shl edx, 8
add edx, eax
mov eax, edi
shr eax, 0x18
add edx, eax
mov dword [ebp + 0x10], edx
add ecx, 0x2c
cmp ecx, 0x4da4
jbe 0x10041790
add esi, 4
cmp dword [ebx], 0
mov dword [ebp + 0xc], esi
je 0x1004194d
mov eax, dword [ebp + 0xc]
movzx edx, byte [eax]
mov ecx, edi
shr ecx, 0x18
xor ecx, edx
shl edi, 8
xor edi, dword [ecx*4 + 0x1007b158]
inc eax
dec dword [ebx]
mov dword [ebp + 0xc], eax
jne 0x100417e8
mov edx, dword [ebp + 0x10]
jmp 0x1004194d
mov eax, ecx
sub eax, 0x4fd7
je 0x1004193a
sub eax, 0xf
je 0x100418fc
sub eax, 0xf
jne 0x1004194d
mov eax, dword [ebp + 8]
xor ecx, ecx
add eax, 0x1a
movzx edx, byte [eax + 1]
movzx ebx, byte [eax]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 1]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 2]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 4]
mov dword [ebp + ecx*4 - 0x4c], edx
movzx edx, byte [eax + 5]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 3]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 2]
shl edx, 8
or edx, ebx
mov dword [ebp + ecx*4 - 0x48], edx
add ecx, 2
add eax, 8
cmp ecx, 0xe
jb 0x10041836
mov ebx, dword [ebp + 8]
add ebx, 8
push ebx
lea eax, [ebp - 0x4c]
push 0x55a3
push eax
call fcn.10006120
mov edx, dword [ebp + 0xc]
add esp, 0xc
inc edx
mov ecx, ebx
mov dword [ebp - 4], 4
jmp 0x100418b0
mov ebx, 0x4724
mov eax, ebx
sub eax, 0x4724
je 0x100418cb
sub eax, 0x11
jne 0x100418de
mov al, byte [ecx + 3]
mov byte [edx + 2], al
jmp 0x100418de
movzx eax, byte [ecx]
mov byte [edx - 1], al
movzx eax, byte [ecx + 1]
mov byte [edx], al
movzx eax, byte [ecx + 2]
mov byte [edx + 1], al
add ebx, 0x11
cmp ebx, 0x4735
jbe 0x100418b5
add ecx, 4
add edx, 4
dec dword [ebp - 4]
jne 0x100418b0
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
jmp 0x1004194d
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
shr eax, 3
and eax, 0x3f
mov ecx, 0x38
cmp eax, 0x38
jl 0x10041916
mov ecx, 0x78
mov edx, dword [ebp + 8]
sub ecx, eax
push edx
lea eax, [ebp - 4]
push eax
push 0x10079050
push 0x7506
mov dword [ebp - 4], ecx
call fcn.1000aa10
mov edx, dword [ebp + 0x10]
add esp, 0x10
jmp 0x1004194d
out dx, eax
xor ah, bh
mov edx, 0x8b08458b
or byte [ebx + 0x4d890440], cl
in al, dx
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
add ecx, 0xf
mov dword [ebp - 8], ecx
cmp ecx, dword [ebp - 0xc]
jbe 0x10041350
pop edi
pop esi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret