Function at 0x405da4
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xfffffd14
mov eax, 0x52c5d4
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
call fcn.0049b3b8
push edi
lea edi, [ebp - 0x60]
mov esi, 0x5025ff
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
pop edi
xor eax, eax
mov word [ebp - 0x18], 8
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x60]
inc dword [ebp - 0xc]
mov word [ebp - 0x18], 0x14
mov dx, word [0x502626]
mov word [ebp - 0x66], dx
push ecx
call fcn.0049b078
pop ecx
mov dword [ebp - 0x30], eax
xor ebx, ebx
lea esi, [ebp - 0xc0]
mov byte [esi], 0
inc ebx
inc esi
cmp ebx, 8
jl 0x405e0c
mov word [ebp - 0x18], 0x20
mov byte [edi + 0x39], 0
push 0x10000
call fcn.0049a2dc
pop ecx
mov dword [ebp - 0x34], eax
push 0x52b28f
mov eax, dword [edi]
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00403510
add esp, 0xc
test al, al
jne 0x405e5a
mov ebx, 1
mov eax, dword [ebp - 0x34]
push eax
call fcn.0049a104
pop ecx
jmp 0x406757
push 2
lea edx, [ebp - 0x66]
push edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.004035d4
add esp, 0xc
cmp byte [0x53a2f0], 0x40
jne 0x405e8b
push 8
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.00403544
mov byte [ebp - 0x3f], 0x51
add esp, 0xc
jmp 0x405f00
cmp byte [0x53a2f0], 0x30
jne 0x405ea4
mov edx, dword [ebp + 8]
push edx
call fcn.004035ac
pop ecx
mov byte [ebp - 0x3f], 0x77
jmp 0x405f00
cmp byte [0x53a2f0], 0x38
jne 0x405ec3
push 6
push 1
mov ecx, dword [ebp + 8]
push ecx
call fcn.00403544
mov byte [ebp - 0x3f], 0x67
add esp, 0xc
jmp 0x405f00
cmp byte [0x53a2f0], 0x50
jne 0x405eec
mov eax, dword [ebp + 8]
push eax
call fcn.004035ac
pop ecx
mov byte [ebp - 0x3f], 0x77
mov byte [ebp - 0x43], 0x39
mov byte [ebp - 0x42], 0x39
mov byte [ebp - 0x41], 0x31
mov byte [ebp - 0x40], 0x31
jmp 0x405f00
push 8
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.00403544
mov byte [ebp - 0x3f], 0x51
add esp, 0xc
push 1
call sub.KERNEL32.DLL_Sleep
mov ecx, dword [ebp + 8]
push ecx
call fcn.004036e0
pop ecx
mov eax, dword [edi + 4]
cmp byte [eax], 0xee
jne 0x405f29
mov edx, dword [edi + 4]
cmp byte [edx + 1], 0
jne 0x405f29
mov ecx, dword [edi + 4]
mov byte [ecx + 1], 5
mov eax, dword [ebp - 0x30]
mov edx, dword [edi + 4]
mov esi, edx
xor ebx, ebx
lea eax, [ebp + eax - 0x64]
mov dl, byte [esi]
mov byte [eax], dl
inc ebx
inc eax
inc esi
cmp ebx, 4
jl 0x405f37
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x60]
push eax
push ecx
mov eax, dword [ebp + 8]
push eax
call fcn.004035d4
add esp, 0xc
mov edx, dword [ebp - 0x30]
add edx, 0xc8
xor eax, eax
push 1
push 0x3e8
push edx
push eax
push 0x11
mov edx, dword [ebp - 0x34]
push edx
mov ecx, dword [ebp - 0x30]
push ecx
lea eax, [ebp - 0x60]
push eax
push edi
mov edx, dword [ebp + 8]
push edx
call fcn.0040580c
add esp, 0x28
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jge 0x405fb0
cmp dword [ebp - 0x38], 0xffffffff
jne 0x405f9c
mov ebx, 0x64
jmp 0x405fa1
mov ebx, 1
mov eax, dword [ebp - 0x34]
push eax
call fcn.0049a104
pop ecx
jmp 0x406757
mov edx, dword [ebp - 0x34]
xor ecx, ecx
xor ebx, ebx
lea esi, [ebp - 0xc0]
mov cl, byte [edx + 0x10]
mov dword [edi + 0x30], ecx
mov eax, dword [ebp - 0x34]
mov dl, byte [eax]
inc eax
and dl, 0xff
inc ebx
mov byte [esi], dl
inc esi
cmp ebx, 0x10
jl 0x405fc6
mov ecx, dword [ebp - 0x34]
push ecx
lea eax, [edi + 0x34]
push eax
call fcn.00404ec0
add esp, 8
test al, al
jne 0x406001
mov byte [edi + 0x38], 1
mov ebx, 2
mov eax, dword [ebp - 0x34]
push eax
call fcn.0049a104
pop ecx
jmp 0x406757
cmp dword [ebp - 0x38], 0x11
jle 0x40603b
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
add eax, 0xffffffef
xor ebx, ebx
cmp eax, ebx
lea esi, [edx + 0x11]
jle 0x406024
mov dl, byte [esi]
inc ebx
mov byte [esi - 0x11], dl
inc esi
cmp eax, ebx
jg 0x406019
mov ebx, eax
mov eax, dword [ebp - 0x34]
lea esi, [eax + ebx]
cmp ebx, dword [ebp - 0x38]
jge 0x40603b
mov byte [esi], 0
inc ebx
inc esi
cmp ebx, dword [ebp - 0x38]
jl 0x406031
mov eax, dword [edi + 4]
cmp byte [eax], 0x93
je 0x40604f
mov edx, dword [edi + 4]
cmp byte [edx], 0xd3
jne 0x406479
push 0xa
call sub.KERNEL32.DLL_Sleep
push 0
call fcn.004a2ed8
pop ecx
push eax
call fcn.0049fb90
pop ecx
xor ebx, ebx
lea esi, [ebp - 0x12ec]
mov byte [esi], 0xff
inc ebx
inc esi
cmp ebx, 0x12c
jl 0x40606d
mov eax, dword [edi + 0xc]
sar eax, 0x10
and al, 0xff
mov byte [ebp - 0x12ec], al
mov edx, dword [edi + 0xc]
sar edx, 8
and dl, 0xff
mov byte [ebp - 0x12eb], dl
mov cl, byte [edi + 0xc]
and cl, 0xff
mov byte [ebp - 0x12ea], cl
mov eax, dword [edi + 0x14]
sar eax, 0x10
and al, 0xff
mov byte [ebp - 0x12e9], al
mov edx, dword [edi + 0x14]
sar edx, 8
and dl, 0xff
mov byte [ebp - 0x12e8], dl
mov cl, byte [edi + 0x14]
and cl, 0xff
mov byte [ebp - 0x12e7], cl
call fcn.0049fbbc
mov ebx, eax
and ebx, 0xff
call fcn.0049fbbc
and eax, 0xff
mov dword [ebp - 0x74], eax
call fcn.0049fbbc
test al, 0xff
jne 0x4060f3
jmp 0x4060f3
mov eax, 1
mov ecx, eax
mov edx, eax
sar ecx, 4
and edx, 0xf
mov dword [ebp - 0x78], edx
and ecx, 0xf
mov dword [ebp - 0x7c], ecx
mov byte [ebp - 0x12e6], bl
mov dl, byte [ebp - 0x74]
xor al, bl
mov byte [ebp - 0x12e5], dl
xor al, byte [ebp - 0x74]
mov byte [ebp - 0x12e4], al
mov eax, dword [edi + 0x14]
sub eax, dword [edi + 0xc]
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
push ecx
call fcn.0049a2dc
pop ecx
mov dword [ebp - 0x64], eax
mov eax, ebx
xor ebx, ebx
mov edx, dword [ebp - 0x64]
cmp ebx, dword [ebp - 0x80]
mov esi, edx
jge 0x406162
mov edx, dword [edi + 8]
mov cl, byte [edx + ebx]
inc ebx
xor cl, al
mov byte [esi], cl
inc esi
add eax, dword [ebp - 0x74]
and eax, 0xff
cmp ebx, dword [ebp - 0x80]
jl 0x406149
push 9
lea eax, [ebp - 0x12ec]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.004035d4
add esp, 0xc
mov edx, 9
push 1
push 0x3e8
push edx
push 0
push 9
mov ecx, dword [ebp - 0x34]
push ecx
push 0
mov eax, dword [edi + 8]
push eax
push edi
mov edx, dword [ebp + 8]
push edx
call fcn.0040580c
add esp, 0x28
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jge 0x4061d3
cmp dword [ebp - 0x38], 0xffffffff
jne 0x4061b5
mov ebx, 0x64
jmp 0x4061ba
mov ebx, 3
mov eax, dword [ebp - 0x64]
push eax
call fcn.0049a104
pop ecx
mov edx, dword [ebp - 0x34]
push edx
call fcn.0049a104
pop ecx
jmp 0x406757
mov dword [ebp - 0x8c], 0x100
mov word [ebp - 0x18], 0x20
mov eax, dword [edi + 0x14]
xor ecx, ecx
sub eax, dword [edi + 0xc]
cdq
idiv dword [ebp - 0x8c]
mov dword [ebp - 0x94], edx
mov eax, dword [edi + 0x14]
sub eax, dword [edi + 0xc]
cdq
idiv dword [ebp - 0x8c]
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x84], ecx
mov eax, dword [ebp - 0x84]
cmp eax, dword [ebp - 0x90]
jge 0x40634c
mov edx, dword [ebp - 0x8c]
xor ebx, ebx
add edx, dword [ebp - 0x78]
lea esi, [ebp - 0x12ec]
add edx, dword [ebp - 0x7c]
mov dword [ebp - 0x88], edx
cmp ebx, dword [ebp - 0x78]
jge 0x406252
call fcn.0049fbbc
and al, 0xff
inc ebx
mov byte [esi], al
inc esi
cmp ebx, dword [ebp - 0x78]
jl 0x406242
mov ebx, dword [ebp - 0x78]
lea esi, [ebp + ebx - 0x12ec]
jmp 0x406279
mov eax, dword [ebp - 0x84]
imul dword [ebp - 0x8c]
add eax, ebx
mov edx, dword [ebp - 0x64]
sub eax, dword [ebp - 0x78]
inc ebx
mov cl, byte [edx + eax]
mov byte [esi], cl
inc esi
mov eax, dword [ebp - 0x88]
sub eax, dword [ebp - 0x7c]
cmp ebx, eax
jl 0x40625e
mov ebx, dword [ebp - 0x88]
sub ebx, dword [ebp - 0x7c]
lea esi, [ebp + ebx - 0x12ec]
cmp ebx, dword [ebp - 0x88]
jge 0x4062b1
call fcn.0049fbbc
and al, 0xff
inc ebx
mov byte [esi], al
inc esi
cmp ebx, dword [ebp - 0x88]
jl 0x40629e
push 0x3c
call sub.KERNEL32.DLL_Sleep
mov eax, dword [ebp - 0x88]
lea edx, [ebp - 0x12ec]
push eax
push edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.004035d4
add esp, 0xc
mov edx, dword [ebp - 0x88]
push 1
push 0x3e8
push edx
push 0
mov eax, dword [ebp - 0x88]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
push 0
mov eax, dword [edi + 8]
push eax
push edi
mov edx, dword [ebp + 8]
push edx
call fcn.0040580c
add esp, 0x28
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jge 0x406334
cmp dword [ebp - 0x38], 0xffffffff
jne 0x406316
mov ebx, 0x64
jmp 0x40631b
mov ebx, 3
mov eax, dword [ebp - 0x64]
push eax
call fcn.0049a104
pop ecx
mov edx, dword [ebp - 0x34]
push edx
call fcn.0049a104
pop ecx
jmp 0x406757
inc dword [ebp - 0x84]
mov ecx, dword [ebp - 0x84]
cmp ecx, dword [ebp - 0x90]
jl 0x406223
cmp dword [ebp - 0x94], 0
jle 0x40646a
mov eax, dword [ebp - 0x94]
xor ebx, ebx
add eax, dword [ebp - 0x78]
lea esi, [ebp - 0x12ec]
add eax, dword [ebp - 0x7c]
mov dword [ebp - 0x88], eax
cmp ebx, dword [ebp - 0x78]
jge 0x406388
call fcn.0049fbbc
and al, 0xff
inc ebx
mov byte [esi], al
inc esi
cmp ebx, dword [ebp - 0x78]
jl 0x406378
mov ebx, dword [ebp - 0x78]
lea esi, [ebp + ebx - 0x12ec]
jmp 0x4063af
mov eax, dword [ebp - 0x84]
imul dword [ebp - 0x94]
add eax, ebx
mov edx, dword [ebp - 0x64]
sub eax, dword [ebp - 0x78]
inc ebx
mov cl, byte [edx + eax]
mov byte [esi], cl
inc esi
mov eax, dword [ebp - 0x88]
sub eax, dword [ebp - 0x7c]
cmp ebx, eax
jl 0x406394
mov ebx, dword [ebp - 0x88]
sub ebx, dword [ebp - 0x7c]
lea esi, [ebp + ebx - 0x12ec]
cmp ebx, dword [ebp - 0x88]
jge 0x4063e7
call fcn.0049fbbc
and al, 0xff
inc ebx
mov byte [esi], al
inc esi
cmp ebx, dword [ebp - 0x88]
jl 0x4063d4
push 0x3c
call sub.KERNEL32.DLL_Sleep
mov eax, dword [ebp - 0x88]
lea edx, [ebp - 0x12ec]
push eax
push edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.004035d4
add esp, 0xc
mov edx, dword [ebp - 0x88]
push 1
push 0x3e8
push edx
push 0
mov eax, dword [ebp - 0x88]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
push 0
mov eax, dword [edi + 8]
push eax
push edi
mov edx, dword [ebp + 8]
push edx
call fcn.0040580c
add esp, 0x28
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jge 0x40646a
cmp dword [ebp - 0x38], 0xffffffff
jne 0x40644c
mov ebx, 0x64
jmp 0x406451
mov ebx, 3
mov eax, dword [ebp - 0x64]
push eax
call fcn.0049a104
pop ecx
mov edx, dword [ebp - 0x34]
push edx
call fcn.0049a104
pop ecx
jmp 0x406757
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.0049a104
pop ecx
jmp 0x4066f4
mov eax, dword [edi + 4]
cmp byte [eax], 0x94
jne 0x4066f4
push 0xa
call sub.KERNEL32.DLL_Sleep
xor ebx, ebx
lea esi, [ebp - 0x12ec]
mov byte [esi], 0xff
inc ebx
inc esi
cmp ebx, 0x12c
jl 0x406494
mov eax, dword [edi + 0xc]
sar eax, 0x10
and al, 0xff
mov byte [ebp - 0x12ec], al
mov edx, dword [edi + 0xc]
sar edx, 8
and dl, 0xff
mov byte [ebp - 0x12eb], dl
mov cl, byte [edi + 0xc]
and cl, 0xff
mov byte [ebp - 0x12ea], cl
mov eax, dword [edi + 0x14]
sar eax, 0x10
and al, 0xff
mov byte [ebp - 0x12e9], al
lea eax, [ebp - 0x12ec]
mov edx, dword [edi + 0x14]
sar edx, 8
and dl, 0xff
mov byte [ebp - 0x12e8], dl
mov cl, byte [edi + 0x14]
and cl, 0xff
mov byte [ebp - 0x12e7], cl
push 6
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.004035d4
add esp, 0xc
mov edx, 6
push 1
push 0x3e8
push edx
push 0
push 6
mov eax, dword [ebp - 0x34]
push eax
push 0
mov ecx, dword [edi + 8]
push ecx
push edi
mov eax, dword [ebp + 8]
push eax
call fcn.0040580c
add esp, 0x28
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jge 0x40655a
cmp dword [ebp - 0x38], 0xffffffff
jne 0x406546
mov ebx, 0x64
jmp 0x40654b
mov ebx, 3
mov eax, dword [ebp - 0x34]
push eax
call fcn.0049a104
pop ecx
jmp 0x406757
mov dword [ebp - 0xa4], 0x100
mov word [ebp - 0x18], 0x20
mov eax, dword [edi + 0x14]
sub eax, dword [edi + 0xc]
cdq
idiv dword [ebp - 0xa4]
mov dword [ebp - 0xa8], edx
mov eax, dword [edi + 0x14]
sub eax, dword [edi + 0xc]
cdq
idiv dword [ebp - 0xa4]
mov esi, eax
xor eax, eax
mov dword [ebp - 0xa0], eax
cmp esi, dword [ebp - 0xa0]
jle 0x40664e
mov edx, dword [ebp - 0xa4]
push edx
mov ecx, dword [edi + 8]
push ecx
mov eax, dword [ebp + 8]
push eax
call fcn.004035d4
add esp, 0xc
mov edx, dword [ebp - 0xa4]
push 1
push 0xbb8
push edx
push 0
mov ecx, dword [ebp - 0xa4]
push ecx
mov eax, dword [ebp - 0x34]
push eax
push 0
mov edx, dword [edi + 8]
push edx
push edi
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040580c
add esp, 0x28
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jge 0x40660f
cmp dword [ebp - 0x38], 0xffffffff
jne 0x4065fb
mov ebx, 0x64
jmp 0x406600
mov ebx, 3
mov eax, dword [ebp - 0x34]
push eax
call fcn.0049a104
pop ecx
jmp 0x406757
xor ebx, ebx
mov eax, dword [ebp - 0x34]
cmp ebx, dword [ebp - 0x38]
jge 0x40663c
mov edx, ebx
xor dl, byte [eax]
inc eax
push edx
mov ecx, dword [ebp - 0xa0]
mov edx, dword [edi + 8]
imul ecx, dword [ebp - 0xa4]
lea ecx, [edx + ecx]
pop edx
mov byte [ecx + ebx], dl
inc ebx
cmp ebx, dword [ebp - 0x38]
jl 0x406619
inc dword [ebp - 0xa0]
cmp esi, dword [ebp - 0xa0]
jg 0x4065a0
cmp dword [ebp - 0xa8], 0
jle 0x4066f4
mov eax, dword [ebp - 0xa8]
push eax
mov ecx, dword [edi + 8]
push ecx
mov eax, dword [ebp + 8]
push eax
call fcn.004035d4
add esp, 0xc
mov edx, dword [ebp - 0xa8]
push 1
push 0x3e8
push edx
push 0
mov ecx, dword [ebp - 0xa8]
push ecx
mov eax, dword [ebp - 0x34]
push eax
push 0
mov edx, dword [edi + 8]
push edx
push edi
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040580c
add esp, 0x28
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jge 0x4066ca
cmp dword [ebp - 0x38], 0xffffffff
jne 0x4066b6
mov ebx, 0x64
jmp 0x4066bb
mov ebx, 3
mov eax, dword [ebp - 0x34]
push eax
call fcn.0049a104
pop ecx
jmp 0x406757
xor ebx, ebx
mov eax, dword [ebp - 0x34]
mov esi, eax
cmp ebx, dword [ebp - 0x38]
jge 0x4066f4
mov eax, dword [ebp - 0xa0]
imul dword [ebp - 0xa4]
mov edx, dword [edi + 8]
lea ecx, [edx + eax]
mov al, byte [esi]
mov byte [ecx + ebx], al
inc ebx
inc esi
cmp ebx, dword [ebp - 0x38]
jl 0x4066d6
mov edx, dword [ebp - 0x34]
push edx
call fcn.0049a104
pop ecx
push 6
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.00403544
add esp, 0xc
cmp byte [edi + 0x1c], 3
je 0x40671a
cmp byte [edi + 0x1c], 2
jne 0x406727
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
push edx
call fcn.00402b2c
pop ecx
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebp - 0xc]
call fcn.004a6e54
pop eax
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x406792
push 6
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.00403544
add esp, 0xc
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 4]
push ecx
call fcn.00402b2c
pop ecx
mov eax, ebx
push eax
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004a6e54
pop eax
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret