Function at 0x401000
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x284], edx
push 0x1c8
lea eax, [ebp - 0x264]
mov dword [ebp - 0x288], ecx
push ebx
push eax
mov dword [ebp - 0x270], ebx
call fcn.00424320
push 0x90
lea eax, [ebp - 0x9c]
push ebx
push eax
call fcn.00424320
lea eax, [ebp - 0x264]
mov dword [ebp - 0x10], ebx
xor esi, esi
mov dword [ebp - 0x280], eax
inc esi
lea edx, [ebp - 0x9c]
mov ecx, eax
mov dword [ebp - 0x18], esi
call fcn.00401444
push ebx
push 0x44b4a0
call fcn.0043d8f0
add esp, 0x20
test eax, eax
je 0x40109a
mov edx, dword [ebp - 0x270]
lea ecx, [ebp - 0x264]
call fcn.004013fd
xor eax, eax
jmp 0x4013ee
mov edi, dword [ebp - 0x280]
push ecx
mov ecx, edi
call fcn.00408a60
mov ecx, edi
mov dword [ebp - 0x14], esi
call fcn.00408f90
push dword [ebp - 0x284]
mov edx, dword [ebp - 0x288]
mov ecx, edi
call fcn.00409210
mov ecx, edi
call fcn.00408da0
lea eax, [ebp - 0x278]
mov dword [ebp - 0x278], ebx
push eax
lea edx, [ebp - 0x10]
mov ecx, edi
call fcn.00409000
and dword [ebp - 0x274], 0
add esp, 0xc
and dword [ebp - 0x26c], 0
mov bl, al
cmp byte [edi + 0x100], 0
mov byte [ebp - 0x265], bl
je 0x401160
mov cl, byte [edi + 0x103]
cmp cl, 1
jne 0x40113b
movzx eax, word [edi + 0x104]
imul eax, eax, 0x1388
push 0x7f
pop esi
movzx ecx, word [edi + 0x106]
cdq
idiv esi
mov dword [ebp - 0x274], eax
imul eax, ecx, 0x1388
cdq
idiv esi
jmp 0x40115a
cmp cl, 2
jne 0x401160
movzx eax, word [edi + 0x104]
imul eax, eax, 0x64
mov dword [ebp - 0x274], eax
movzx eax, word [edi + 0x106]
imul eax, eax, 0x64
mov dword [ebp - 0x26c], eax
mov ecx, edi
call fcn.00409280
mov ax, word [edi + 0x68]
xor esi, esi
shl ax, 3
push 8
movzx eax, ax
pop ecx
mov dword [ebp - 0x27c], eax
cmp ax, cx
jne 0x401190
cmp dword [edi + 0x2c], 1
mov esi, 0x100
je 0x401190
mov esi, dword [edi + 0x70]
mov ecx, dword [edi + 0x60]
movzx eax, ax
imul eax, dword [edi + 0x5c]
push 0x28
add eax, 0x1f
shr eax, 5
shl eax, 2
imul ecx, eax
test bl, bl
mov dword [ebp - 0x290], eax
pop eax
push 0x7c
pop edx
cmovne eax, edx
mov dword [ebp - 0x298], ecx
mov dword [ebp - 0x28c], eax
lea eax, [eax + esi*4]
add eax, ecx
add eax, dword [ebp - 0x278]
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x270], eax
test eax, eax
jne 0x4011e8
mov edx, eax
jmp 0x401088
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
mov dword [ebp - 0x294], ebx
test ebx, ebx
je 0x401082
mov eax, dword [ebp - 0x28c]
xor edx, edx
mov ecx, dword [ebp - 0x274]
inc edx
mov dword [ebx], eax
mov eax, dword [edi + 0x5c]
mov dword [ebx + 4], eax
mov eax, dword [edi + 0x60]
and dword [ebx + 0x10], 0
mov dword [ebx + 0x18], ecx
mov ecx, dword [ebp - 0x26c]
push 8
mov dword [ebx + 0x1c], ecx
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x27c]
pop ecx
mov word [ebx + 0xc], dx
mov word [ebx + 0xe], ax
mov dword [ebx + 0x20], esi
cmp ax, cx
jne 0x4012a3
mov ecx, ebx
call fcn.00404532
xor ecx, ecx
cmp dword [edi + 0x2c], edx
jne 0x40126e
test esi, esi
je 0x4012a3
inc eax
mov byte [eax + 1], cl
mov byte [eax], cl
lea eax, [eax + 4]
mov byte [eax - 5], cl
inc ecx
mov byte [eax - 2], 0
cmp ecx, esi
jb 0x401258
jmp 0x4012a3
test esi, esi
je 0x4012a3
lea edx, [eax + 1]
mov eax, dword [edi + 0x74]
mov eax, dword [eax]
mov al, byte [ecx + eax]
mov byte [edx + 1], al
mov eax, dword [edi + 0x74]
mov eax, dword [eax + 4]
mov al, byte [ecx + eax]
mov byte [edx], al
lea edx, [edx + 4]
mov eax, dword [edi + 0x74]
mov eax, dword [eax + 8]
mov al, byte [ecx + eax]
inc ecx
mov byte [edx - 5], al
mov byte [edx - 2], 0
cmp ecx, esi
jb 0x401275
mov ecx, ebx
call fcn.00404543
and dword [ebp - 0xc], 0
mov edx, eax
mov ecx, dword [edi + 0x78]
mov esi, dword [edi + 0x60]
mov dword [ebp - 0x26c], edx
cmp ecx, esi
jae 0x40138c
mov ebx, eax
sub esi, ecx
lea edx, [ebp - 0xc]
dec esi
imul esi, dword [ebp - 0x290]
push ecx
mov ecx, edi
add esi, ebx
mov dword [ebp - 0xc], esi
call fcn.00409430
cmp byte [ebp - 0x265], 0
pop ecx
jne 0x401372
cmp dword [edi + 0x2c], 4
jne 0x401372
mov eax, dword [edi + 0x5c]
shl eax, 2
test eax, eax
je 0x401372
push 0xfffffffffffffffe
pop eax
sub eax, esi
lea ebx, [esi + 2]
mov dword [ebp - 0x27c], eax
movzx ecx, byte [ebx + 1]
movzx eax, byte [ebx - 1]
movzx edx, byte [ebx]
movzx esi, byte [ebx - 2]
imul eax, ecx
imul edx, ecx
imul esi, ecx
mov byte [ebx + 1], 0xff
sub eax, 0xffffff80
mov ecx, eax
sub edx, 0xffffff80
shr ecx, 8
sub esi, 0xffffff80
add ecx, eax
mov eax, edx
shr eax, 8
add eax, edx
shr ecx, 8
shr eax, 8
mov byte [ebx - 2], al
mov eax, esi
shr eax, 8
add eax, esi
mov byte [ebx - 1], cl
mov ecx, dword [ebp - 0x27c]
shr eax, 8
mov byte [ebx], al
add ebx, 4
mov eax, dword [edi + 0x5c]
add ecx, ebx
shl eax, 2
cmp ecx, eax
jb 0x40130c
mov ebx, dword [ebp - 0x26c]
mov ecx, dword [edi + 0x78]
mov esi, dword [edi + 0x60]
cmp ecx, esi
jb 0x4012c6
mov ebx, dword [ebp - 0x294]
mov edx, dword [ebp - 0x26c]
cmp byte [ebp - 0x265], 0
je 0x4013cb
mov ecx, dword [ebp - 0x298]
mov eax, edx
mov esi, dword [ebp - 0x278]
sub eax, ebx
add eax, ecx
mov dword [ebx + 0x38], 0x4d424544
mov dword [ebx + 0x70], eax
push esi
mov dword [ebx + 0x6c], 4
lea eax, [edx + ecx]
mov dword [ebx + 0x74], esi
push dword [ebp - 0x10]
push eax
call fcn.00423bf0
add esp, 0xc
mov esi, dword [ebp - 0x270]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, edi
call fcn.00408ed0
xor edx, edx
lea ecx, [ebp - 0x264]
call fcn.004013fd
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00422fb4
leave
ret