Function at 0x41fd80
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x78
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov al, byte [ebp + 0x166]
mov cl, byte [ebp + 0x175]
mov byte [esp + 0x20], al
mov al, byte [ebp + 0xa0]
inc al
mov byte [esp + 0x13], cl
imul byte [ebp + 0x156]
mov byte [esp + 0x28], al
mov al, byte [ebp + 0x176]
mov byte [esp + 0x14], al
imul cl
mov byte [esp + 0x2c], al
xor ecx, ecx
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], ecx
and eax, 0xff
mov dword [esp + 0x34], ecx
mov esi, eax
mov dword [esp + 0x38], ecx
shl esi, 4
add esi, eax
mov dword [esp + 0x3c], ecx
shl esi, 2
push esi
mov dword [esp + 0x44], ecx
call sub.MFC42.DLL_operatornew
mov ecx, esi
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x28], edi
mov esi, dword [esp + 0x2c]
rep stosd dword es:[edi], eax
mov ecx, edx
and esi, 0xff
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x48]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x24]
and eax, 0xff
imul esi, eax
shl esi, 9
push esi
mov dword [esp + 0x30], esi
call sub.MFC42.DLL_operatornew
mov ebx, eax
mov al, byte [esp + 0x1b]
add esp, 8
mov dword [esp + 0x1c], ebx
test al, al
mov byte [esp + 0x20], 0
jbe 0x41ffbd
xor al, al
mov byte [esp + 0x12], al
mov cl, byte [esp + 0x14]
mov byte [esp + 0x11], 0
test cl, cl
jbe 0x41ff99
mov byte [esp + 0x18], al
mov ecx, esi
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp byte [ebp + 0x165], 1
jbe 0x41fee2
cmp byte [esp + 0x14], 1
jbe 0x41fee2
cmp byte [ebp + 0x158], 2
jne 0x41feb4
mov si, word [ebp + 0x160]
movzx ax, byte [esp + 0x11]
shr si, 1
imul esi, eax
add esi, dword [esp + 0x90]
jmp 0x41fee9
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x14]
and eax, 0xffff
and ecx, 0xff
cdq
idiv ecx
movzx dx, byte [esp + 0x14]
mov esi, eax
movzx ax, byte [esp + 0x11]
imul esi, edx
add esi, eax
jmp 0x41fee9
mov esi, dword [esp + 0x90]
mov ecx, dword [ebp + 0x184]
mov edi, dword [esp + 0x20]
push esi
push edi
mov edx, dword [ecx]
call dword [edx + 4]
push ebx
push esi
push edi
mov ecx, ebp
call fcn.00421000
mov ecx, dword [ebp + 0x184]
push esi
push edi
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
push esi
push edi
mov ecx, ebp
call fcn.004212d0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
and eax, 0xff
mov ecx, eax
shl ecx, 4
add ecx, eax
mov eax, dword [esp + 0x1c]
lea ebx, [edx + ecx*4]
mov ecx, ebp
push ebx
push eax
call fcn.00421570
sub esp, 0x44
mov ecx, 0x11
mov esi, ebx
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
call fcn.00420180
sub esp, 0x44
mov ecx, 0x11
mov esi, ebx
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x88]
push ecx
mov ecx, ebp
call fcn.00421830
mov al, byte [esp + 0x11]
mov dl, byte [esp + 0x18]
mov cl, byte [esp + 0x14]
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x28]
inc al
inc dl
cmp al, cl
mov byte [esp + 0x11], al
mov byte [esp + 0x18], dl
jb 0x41fe6b
mov al, byte [esp + 0x12]
mov dl, byte [esp + 0x14]
mov cl, byte [esp + 0x20]
add al, dl
mov dl, byte [esp + 0x13]
inc cl
cmp cl, dl
mov byte [esp + 0x20], cl
mov byte [esp + 0x12], al
jb 0x41fe56
sub esp, 0x44
mov ecx, 0x11
lea esi, [esp + 0x88]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
call fcn.00420180
cmp byte [ebp + 0x138], 2
jne 0x420072
mov cl, byte [esp + 0x30]
sub esp, 0x44
or cl, 2
lea esi, [esp + 0x88]
mov byte [esp + 0x74], cl
mov ecx, 0x11
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
call fcn.00421a90
mov edx, dword [esp + 0x34]
and eax, 0xff
and edx, 0xf
mov dword [esp + 0x38], eax
cmp dl, 0xf
je 0x42002c
mov ecx, eax
and ecx, 0xf
cmp cl, 0xf
jne 0x42002c
mov dword [esp + 0x34], eax
mov al, byte [ebp + 0x157]
xor cl, cl
test al, al
mov byte [esp + 0x28], cl
jbe 0x42013e
mov eax, dword [esp + 0x28]
and eax, 0xff
mov dl, byte [esp + eax + 0x44]
cmp dl, byte [ebp + 0x10268]
setbe dl
add byte [eax + ebp + 0x10260], dl
mov al, byte [ebp + 0x157]
inc cl
cmp cl, al
mov byte [esp + 0x28], cl
jb 0x420040
jmp 0x42013e
mov al, byte [ebp + 0x156]
xor dl, dl
test al, al
mov byte [esp + 0x28], dl
jbe 0x4200bd
mov eax, dword [esp + 0x28]
mov cl, byte [ebp + 0x10268]
and eax, 0xff
cmp byte [esp + eax + 0x58], cl
ja 0x4200a4
cmp byte [esp + eax + 0x48], cl
ja 0x4200a4
mov ecx, 1
jmp 0x4200a6
xor ecx, ecx
add byte [eax + ebp + 0x10260], cl
mov al, byte [ebp + 0x156]
inc dl
cmp dl, al
mov byte [esp + 0x28], dl
jb 0x420082
mov al, byte [esp + 0x30]
mov ecx, dword [esp + 0x24]
or al, 1
mov byte [esp + 0x30], al
mov eax, dword [esp + 0x2c]
push eax
push ecx
mov ecx, ebp
call fcn.00421920
and eax, 0xff
sub esp, 0x44
mov dword [esp + 0x78], eax
mov al, byte [esp + 0x74]
mov ecx, 0x11
lea esi, [esp + 0x88]
mov edi, esp
or al, 4
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov byte [esp + 0x74], al
call fcn.00421bb0
and eax, 0xff
sub esp, 0x44
mov dword [esp + 0x80], eax
mov al, byte [esp + 0x74]
mov ecx, 0x11
lea esi, [esp + 0x88]
mov edi, esp
or al, 8
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov byte [esp + 0x74], al
call fcn.00421d20
and eax, 0xff
mov dword [esp + 0x40], eax
test ebx, ebx
je 0x42014b
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x24]
test eax, eax
je 0x42015c
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x8c]
mov ecx, 5
lea esi, [esp + 0x30]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret 8