Function at 0x402ef0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x34
push ebx
mov ebx, dword [sym.imp.MSVCR71.dll_malloc]
push ebp
mov ebp, dword [esp + 0x40]
mov eax, dword [ebp + 0x1c]
push esi
lea eax, [eax + eax*4]
shl eax, 2
push edi
push eax
call ebx
mov esi, dword [esp + 0x50]
mov edi, eax
mov eax, dword [ebp + 0x1c]
lea ecx, [eax + eax*4]
shl ecx, 2
mov edx, ecx
shr ecx, 2
xor eax, eax
mov dword [esp + 0x24], edi
rep stosd dword es:[edi], eax
mov ecx, edx
lea esi, [esi + esi*4]
and ecx, 3
shl esi, 2
push esi
rep stosb byte es:[edi], al
call ebx
mov edi, eax
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov dword [esp + 0x18], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0x1c]
xor eax, eax
add esp, 8
cmp ecx, eax
mov dword [esp + 0x14], eax
jle 0x40304d
mov esi, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
lea ecx, [ecx]
mov eax, dword [ebp + 0xcf8]
mov edi, dword [esp + 0x1c]
mov ecx, dword [eax + edi + 0xc]
mov edx, dword [eax + edi + 0x14]
add eax, edi
cmp ecx, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x48], ecx
jge 0x40302b
mov ebx, dword [eax + 8]
cmp ebx, dword [eax + 0x10]
jge 0x40301b
mov eax, dword [ebp + 8]
imul eax, ecx
mov ecx, dword [esp + 0x50]
add eax, ebx
test ecx, ecx
je 0x402fbc
mov ecx, dword [ebp + 0x34]
movzx ecx, byte [ecx + eax]
shl ecx, 0x10
jmp 0x402fbe
xor ecx, ecx
mov edx, dword [ebp + 0x448]
mov dword [esp + 0x28], ebx
xor ebx, ebx
mov bh, byte [eax + edx]
mov edx, dword [ebp + 0x85c]
mov bl, byte [eax + edx]
mov edx, dword [esi]
xor eax, eax
or ebx, ecx
test edx, edx
mov edi, ebx
mov ebx, dword [esp + 0x28]
jle 0x402ffc
lea ecx, [esi + 4]
lea esp, [esp]
cmp dword [ecx], edi
je 0x40300b
inc eax
add ecx, 4
cmp eax, dword [esi]
jl 0x402ff0
cmp edx, 4
je 0x403273
mov dword [esi + edx*4 + 4], edi
inc dword [esi]
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x10]
inc ebx
cmp ebx, ecx
mov ecx, dword [esp + 0x48]
jl 0x402fa0
mov edx, dword [eax + 0x14]
inc ecx
cmp ecx, edx
mov dword [esp + 0x48], ecx
jl 0x402f94
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov ecx, dword [ebp + 0x1c]
inc eax
add edi, 0x2c
add esi, 0x14
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edi
jl 0x402f70
mov eax, dword [ebp + 0x1c]
test eax, eax
mov dword [esp + 0x1c], 1
jle 0x403070
lea esp, [esp]
mov ecx, dword [esp + 0x1c]
imul ecx, dword [esp + 0x4c]
dec eax
mov dword [esp + 0x1c], ecx
jne 0x403060
mov eax, dword [esp + 0x1c]
xor edx, edx
test eax, eax
mov dword [esp + 0x14], edx
jle 0x403273
mov esi, dword [esp + 0x4c]
xor ebx, ebx
cmp esi, ebx
jle 0x40309a
mov eax, dword [esp + 0x10]
mov ecx, esi
mov dword [eax], ebx
add eax, 0x14
dec ecx
jne 0x403092
cmp dword [ebp + 0x1c], ebx
mov eax, edx
mov dword [esp + 0x48], ebx
jle 0x403162
mov edx, dword [esp + 0x20]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], edx
jmp 0x4030c0
mov eax, dword [esp + 0x2c]
jmp 0x4030c0
cdq
idiv esi
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x28], 0
lea ecx, [edx + edx*4]
lea ecx, [edi + ecx*4]
mov edi, dword [ebp + 0xcf8]
inc edx
mov dword [ebx + edi + 0x28], edx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
cmp dword [ebx], 0
jle 0x403136
add ebx, 4
mov edi, dword [ecx]
mov eax, dword [ebx]
xor edx, edx
test edi, edi
jle 0x40310d
lea esi, [ecx + 4]
cmp dword [esi], eax
je 0x40311c
inc edx
add esi, 4
cmp edx, dword [ecx]
jl 0x403101
cmp edi, 4
je 0x40325e
mov dword [ecx + edi*4 + 4], eax
inc dword [ecx]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
mov esi, dword [edx]
inc eax
add ebx, 4
cmp eax, esi
mov dword [esp + 0x28], eax
jl 0x4030f4
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov ecx, dword [ebp + 0x1c]
inc eax
add edi, 0x14
add edx, 0x2c
cmp eax, ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x24], edx
jl 0x4030b7
xor ebx, ebx
cmp dword [esp + 0x50], ebx
je 0x403294
mov edx, dword [ebp + 0x438]
xor eax, eax
cmp edx, ebx
mov dword [esp + 0x30], edx
jle 0x40318d
lea esp, [esp]
mov dword [esp + eax*4 + 0x34], eax
mov edx, dword [esp + 0x30]
inc eax
cmp eax, edx
jl 0x403180
mov ecx, dword [esp + 0x10]
lea eax, [ebp + 0xcc8]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x24], eax
cmp dword [esp + 0x48], esi
mov dword [esp + 0x18], ecx
jge 0x4032fa
mov esi, dword [esp + 0x24]
or eax, 0xffffffff
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
xor eax, eax
test edx, edx
jle 0x4031e1
jmp 0x4031d0
and dword [esp + eax*4 + 0x34], 0xff
mov edx, dword [esp + 0x30]
inc eax
cmp eax, edx
jl 0x4031d0
mov eax, dword [ecx]
xor edi, edi
test eax, eax
jle 0x40323e
lea ebx, [ecx + 4]
lea esp, [esp]
mov esi, dword [ebx]
mov eax, esi
sar eax, 0x10
xor ecx, ecx
test edx, edx
jle 0x40320b
lea ecx, [ecx]
cmp dword [esp + ecx*4 + 0x34], eax
je 0x403215
inc ecx
cmp ecx, edx
jl 0x403200
cmp edx, 4
je 0x40325e
inc edx
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x48]
or eax, 0x100
mov dword [esp + ecx*4 + 0x34], eax
lea eax, [ecx + edx*4]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x30]
mov dword [ebp + eax*4 + 0xcc8], esi
mov eax, dword [ecx]
inc edi
add ebx, 4
cmp edi, eax
jl 0x4031f0
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x48]
add esi, 0x10
inc edi
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x48], edi
add ecx, 0x14
jmp 0x40319f
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
inc edx
cmp edx, eax
mov dword [esp + 0x14], edx
jl 0x403082
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.MSVCR71.dll_free]
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call esi
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret
cmp esi, ebx
jle 0x4032fa
mov esi, dword [esp + 0x10]
lea edx, [ebp + 0xcc8]
mov dword [esp + 0x48], edx
mov ecx, dword [esi]
xor eax, eax
test ecx, ecx
jle 0x4032cb
mov edx, dword [esp + 0x48]
lea ecx, [esi + 4]
mov edi, dword [ecx]
mov dword [edx], edi
mov edi, dword [esi]
inc eax
add ecx, 4
add edx, 4
cmp eax, edi
jl 0x4032b5
cmp eax, 4
jge 0x4032e1
lea ecx, [eax + ebx*4]
lea edi, [ebp + ecx*4 + 0xcc8]
mov ecx, 4
sub ecx, eax
or eax, 0xffffffff
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
inc ebx
add edx, 0x10
add esi, 0x14
cmp ebx, eax
mov dword [esp + 0x48], edx
jl 0x4032a6
mov esi, eax
mov edx, dword [esp + 0x20]
mov edi, dword [sym.imp.MSVCR71.dll_free]
push edx
call edi
mov eax, dword [esp + 0x14]
push eax
call edi
mov ecx, dword [esp + 0x58]
mov edx, dword [sym.imp.MSVCR71.dll__iob]
push ecx
push esi
add edx, 0x40
push str.INFO:_Pickbuttongroups__success_with__d_groups__useimg_d_n
push edx
call dword [sym.imp.MSVCR71.dll_fprintf]
add esp, 0x18
pop edi
mov dword [ebp + 0xcc4], esi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x34
ret