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

Disassembly:
sub esp, 0x188
mov eax, dword [0x59c6b8]
xor eax, esp
mov dword [esp + 0x184], eax
push esi
mov esi, ecx
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x18], eax
cmp dword [esi + 0x28], ecx
jle 0x46f3bd
push ebx
push ebp
push edi
jmp 0x46ec80
mov dword [esp + 0x20], ecx
cmp dword [esi + 0x24], ecx
jle 0x46f3aa
lea ecx, [ecx]
mov dword [esp + 0x28], ecx
cmp dword [esi + 0xc0], ecx
jle 0x46f10c
lea eax, [esi + 0xd9c]
lea ebx, [esi + 0x30]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], ebx
jmp 0x46ecb7
mov ebx, dword [esp + 0x10]
mov ecx, dword [ebx + 8]
shl ecx, 7
lea edx, [ecx + esi + 0xd4]
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x4c], edx
mov eax, ecx
cdq
idiv dword [ebx]
mov edi, dword [esi + 0x20]
mov dword [esp + 0x1c], 0
mov ebp, eax
mov eax, edi
cdq
idiv dword [ebx + 4]
mov dword [esp + 0x50], ebp
mov ebx, eax
mov eax, ebp
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esp + 0x30], eax
mov eax, ebx
cdq
and edx, 7
lea ebp, [edx + eax]
sar ebp, 3
mov dword [esp + 0x48], ebx
mov dword [esp + 0x44], ebp
test edi, edi
jle 0x46f0eb
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
lea esp, [esp]
mov dword [esp + 0x18], 0
test ecx, ecx
jle 0x46f0d4
mov ecx, dword [esi + 0x24]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
imul edx, ecx
imul ecx, ebp
add edx, dword [esp + 0x18]
mov eax, dword [eax]
add edx, dword [esp + 0x20]
add ecx, ecx
lea eax, [eax + edx*4]
lea edx, [ecx + ecx]
lea ecx, [esp + 0x58]
mov edi, 2
lea esp, [esp]
mov ebx, dword [eax]
mov dword [ecx - 4], ebx
mov ebx, dword [eax + 4]
mov dword [ecx], ebx
mov ebx, dword [eax + 8]
mov dword [ecx + 4], ebx
mov ebx, dword [eax + 0xc]
mov dword [ecx + 8], ebx
mov ebx, dword [eax + 0x10]
mov dword [ecx + 0xc], ebx
mov ebx, dword [eax + 0x14]
mov dword [ecx + 0x10], ebx
mov ebx, dword [eax + 0x18]
mov dword [ecx + 0x14], ebx
mov ebx, dword [eax + 0x1c]
mov dword [ecx + 0x18], ebx
mov ebx, dword [eax + edx]
mov dword [ecx + 0x1c], ebx
mov ebx, dword [eax + edx + 4]
mov dword [ecx + 0x20], ebx
mov ebx, dword [eax + edx + 8]
add eax, edx
mov dword [ecx + 0x24], ebx
mov ebx, dword [eax + 0xc]
mov dword [ecx + 0x28], ebx
mov ebx, dword [eax + 0x10]
mov dword [ecx + 0x2c], ebx
mov ebx, dword [eax + 0x14]
mov dword [ecx + 0x30], ebx
mov ebx, dword [eax + 0x18]
mov dword [ecx + 0x34], ebx
mov ebx, dword [eax + 0x1c]
mov dword [ecx + 0x38], ebx
mov ebx, dword [eax + edx]
mov dword [ecx + 0x3c], ebx
mov ebx, dword [eax + edx + 4]
add eax, edx
mov dword [ecx + 0x40], ebx
mov ebx, dword [eax + 8]
mov dword [ecx + 0x44], ebx
mov ebx, dword [eax + 0xc]
mov dword [ecx + 0x48], ebx
mov ebx, dword [eax + 0x10]
mov dword [ecx + 0x4c], ebx
mov ebx, dword [eax + 0x14]
mov dword [ecx + 0x50], ebx
mov ebx, dword [eax + 0x18]
mov dword [ecx + 0x54], ebx
mov ebx, dword [eax + 0x1c]
add eax, edx
mov dword [ecx + 0x58], ebx
mov ebx, dword [eax]
mov dword [ecx + 0x5c], ebx
mov ebx, dword [eax + 4]
mov dword [ecx + 0x60], ebx
mov ebx, dword [eax + 8]
mov dword [ecx + 0x64], ebx
mov ebx, dword [eax + 0xc]
mov dword [ecx + 0x68], ebx
mov ebx, dword [eax + 0x10]
mov dword [ecx + 0x6c], ebx
mov ebx, dword [eax + 0x14]
mov dword [ecx + 0x70], ebx
mov ebx, dword [eax + 0x18]
mov dword [ecx + 0x74], ebx
mov ebx, dword [eax + 0x1c]
mov dword [ecx + 0x78], ebx
add eax, edx
sub ecx, 0xffffff80
dec edi
jne 0x46ed60
mov eax, dword [esp + 0x4c]
lea ecx, [esp + 0x154]
push ecx
lea edx, [esp + 0x58]
push edx
push eax
mov ecx, esi
call fcn.0046c170
mov eax, dword [esi + 0x24]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
imul ecx, eax
add ecx, dword [esp + 0x18]
mov edx, dword [edx]
add ecx, dword [esp + 0x20]
lea edx, [edx + ecx*4]
mov ecx, dword [esp + 0x30]
cmp ecx, 1
jne 0x46ef87
cmp ebp, ecx
jne 0x46f040
lea eax, [esp + 0x155]
lea edi, [ecx + 1]
movzx ecx, byte [eax - 1]
mov dword [edx], ecx
movzx ecx, byte [eax]
mov dword [edx + 4], ecx
movzx ecx, byte [eax + 1]
mov dword [edx + 8], ecx
movzx ecx, byte [eax + 2]
mov dword [edx + 0xc], ecx
movzx ecx, byte [eax + 3]
mov dword [edx + 0x10], ecx
movzx ecx, byte [eax + 4]
mov dword [edx + 0x14], ecx
movzx ecx, byte [eax + 5]
mov dword [edx + 0x18], ecx
movzx ecx, byte [eax + 6]
mov dword [edx + 0x1c], ecx
mov ecx, dword [esi + 0x24]
lea ecx, [edx + ecx*4]
movzx edx, byte [eax + 7]
mov dword [ecx], edx
movzx edx, byte [eax + 8]
mov dword [ecx + 4], edx
movzx edx, byte [eax + 9]
mov dword [ecx + 8], edx
movzx edx, byte [eax + 0xa]
mov dword [ecx + 0xc], edx
movzx edx, byte [eax + 0xb]
mov dword [ecx + 0x10], edx
movzx edx, byte [eax + 0xc]
mov dword [ecx + 0x14], edx
movzx edx, byte [eax + 0xd]
mov dword [ecx + 0x18], edx
movzx edx, byte [eax + 0xe]
mov dword [ecx + 0x1c], edx
mov edx, dword [esi + 0x24]
lea ecx, [ecx + edx*4]
movzx edx, byte [eax + 0xf]
mov dword [ecx], edx
movzx edx, byte [eax + 0x10]
mov dword [ecx + 4], edx
movzx edx, byte [eax + 0x11]
mov dword [ecx + 8], edx
movzx edx, byte [eax + 0x12]
mov dword [ecx + 0xc], edx
movzx edx, byte [eax + 0x13]
mov dword [ecx + 0x10], edx
movzx edx, byte [eax + 0x14]
mov dword [ecx + 0x14], edx
movzx edx, byte [eax + 0x15]
mov dword [ecx + 0x18], edx
movzx edx, byte [eax + 0x16]
mov dword [ecx + 0x1c], edx
mov edx, dword [esi + 0x24]
lea ecx, [ecx + edx*4]
movzx edx, byte [eax + 0x17]
mov dword [ecx], edx
movzx edx, byte [eax + 0x18]
mov dword [ecx + 4], edx
movzx edx, byte [eax + 0x19]
mov dword [ecx + 8], edx
movzx edx, byte [eax + 0x1a]
mov dword [ecx + 0xc], edx
movzx edx, byte [eax + 0x1b]
mov dword [ecx + 0x10], edx
movzx edx, byte [eax + 0x1c]
mov dword [ecx + 0x14], edx
movzx edx, byte [eax + 0x1d]
mov dword [ecx + 0x18], edx
movzx edx, byte [eax + 0x1e]
mov dword [ecx + 0x1c], edx
mov edx, dword [esi + 0x24]
add eax, 0x20
dec edi
lea edx, [ecx + edx*4]
jne 0x46ee85
jmp 0x46f0b9
cmp ecx, 2
jne 0x46f040
cmp ebp, ecx
jne 0x46f040
lea eax, [edx + eax*4]
lea ecx, [esp + 0x155]
mov ebx, 8
movzx edi, byte [ecx - 1]
mov dword [eax + 4], edi
mov dword [eax], edi
mov dword [edx + 4], edi
mov dword [edx], edi
movzx edi, byte [ecx]
mov dword [eax + 0xc], edi
mov dword [eax + 8], edi
mov dword [edx + 0xc], edi
mov dword [edx + 8], edi
movzx edi, byte [ecx + 1]
mov dword [eax + 0x14], edi
mov dword [eax + 0x10], edi
mov dword [edx + 0x14], edi
mov dword [edx + 0x10], edi
movzx edi, byte [ecx + 2]
mov dword [eax + 0x1c], edi
mov dword [eax + 0x18], edi
mov dword [edx + 0x1c], edi
mov dword [edx + 0x18], edi
movzx edi, byte [ecx + 3]
mov dword [eax + 0x24], edi
mov dword [eax + 0x20], edi
mov dword [edx + 0x24], edi
mov dword [edx + 0x20], edi
movzx edi, byte [ecx + 4]
mov dword [eax + 0x2c], edi
mov dword [eax + 0x28], edi
mov dword [edx + 0x2c], edi
mov dword [edx + 0x28], edi
movzx edi, byte [ecx + 5]
mov dword [eax + 0x34], edi
mov dword [eax + 0x30], edi
mov dword [edx + 0x34], edi
mov dword [edx + 0x30], edi
movzx edi, byte [ecx + 6]
mov dword [eax + 0x3c], edi
mov dword [eax + 0x38], edi
mov dword [edx + 0x3c], edi
mov dword [edx + 0x38], edi
mov edi, dword [esi + 0x24]
add edi, edi
add edi, edi
add edi, edi
add edx, edi
add eax, edi
add ecx, 8
dec ebx
jne 0x46efa7
jmp 0x46f0b9
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], 8
mov ebx, edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], 8
mov edi, edi
test ebp, ebp
jle 0x46f089
mov ecx, dword [esp + 0x30]
test ecx, ecx
jle 0x46f07c
mov eax, dword [esp + 0x34]
movzx eax, byte [esp + eax + 0x154]
mov edi, ebx
rep stosd dword es:[edi], eax
dec ebp
mov ecx, dword [esi + 0x24]
lea ebx, [ebx + ecx*4]
jne 0x46f064
mov ebp, dword [esp + 0x44]
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x38]
add eax, eax
mov ecx, 1
add dword [esp + 0x34], ecx
add eax, eax
add ebx, eax
sub dword [esp + 0x40], ecx
mov dword [esp + 0x38], ebx
jne 0x46f060
mov eax, dword [esi + 0x24]
imul eax, ebp
dec dword [esp + 0x3c]
lea edx, [edx + eax*4]
jne 0x46f050
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x50]
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x18], eax
cmp eax, ecx
jl 0x46ed30
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x1c]
add dword [esp + 0x14], ebx
add eax, ebx
mov dword [esp + 0x1c], eax
cmp eax, dword [esi + 0x20]
jl 0x46ed20
mov eax, dword [esp + 0x28]
add dword [esp + 0x10], 0x14
add dword [esp + 0x2c], 4
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esi + 0xc0]
jl 0x46ecb3
xor ecx, ecx
cmp dword [esi + 0xc4], ecx
je 0x46f392
mov eax, dword [esi + 0xc0]
cmp eax, 3
jne 0x46f248
mov dword [esp + 0x1c], ecx
cmp dword [esi + 0x20], ecx
jle 0x46f392
mov ecx, dword [esp + 0x24]
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x10], ecx
nop
mov ecx, dword [esi + 0x24]
imul ecx, dword [esp + 0x10]
add ecx, dword [esp + 0x20]
mov edi, dword [esi + 0xd9c]
mov ebx, dword [esi + 0xda0]
mov eax, dword [esi + 0xda4]
add ecx, ecx
add ecx, ecx
add eax, ecx
add edi, ecx
add ebx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
test edx, edx
jle 0x46f22d
lea esp, [esp]
mov eax, dword [eax]
mov edx, dword [edi]
mov ecx, dword [ebx]
add eax, 0xffffff80
mov ebp, eax
imul eax, eax, 0xffff492e
imul ebp, ebp, 0x166e9
shl edx, 0x10
lea ebp, [edx + ebp + 0x8000]
sar ebp, 0x10
add ebp, 0x180
add ecx, 0xffffff80
and ebp, 0x3ff
movzx ebp, byte [ebp + 0x59da90]
mov dword [edi], ebp
mov ebp, ecx
imul ecx, ecx, 0x1c5a2
imul ebp, ebp, 0x5819
sub eax, ebp
lea eax, [eax + edx + 0x8000]
sar eax, 0x10
lea ecx, [ecx + edx + 0x8000]
add eax, 0x180
and eax, 0x3ff
movzx eax, byte [eax + 0x59da90]
sar ecx, 0x10
add ecx, 0x180
mov dword [ebx], eax
mov eax, dword [esp + 0x14]
and ecx, 0x3ff
movzx edx, byte [ecx + 0x59da90]
mov ecx, dword [esp + 0x18]
mov dword [eax], edx
mov edx, dword [esi + 0x1c]
inc ecx
add eax, 4
add edi, 4
add ebx, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
cmp ecx, edx
jl 0x46f180
mov eax, dword [esp + 0x1c]
inc dword [esp + 0x10]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [esi + 0x20]
jl 0x46f140
jmp 0x46f390
cmp eax, 4
jne 0x46f392
mov dword [esp + 0x1c], ecx
cmp dword [esi + 0x20], ecx
jle 0x46f392
mov eax, dword [esp + 0x24]
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x10], eax
lea esp, [esp]
mov ecx, dword [esi + 0x24]
imul ecx, dword [esp + 0x10]
add ecx, dword [esp + 0x20]
mov edi, dword [esi + 0xd9c]
mov eax, dword [esi + 0xda0]
mov ebx, dword [esi + 0xda4]
add ecx, ecx
add ecx, ecx
add eax, ecx
add ebx, ecx
add edi, ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], 0
test edx, edx
jle 0x46f37a
mov ecx, dword [eax]
mov eax, dword [ebx]
mov edx, dword [edi]
add eax, 0xffffff80
mov ebx, eax
imul eax, eax, 0xffff492e
imul ebx, ebx, 0x166e9
shl edx, 0x10
lea ebx, [ebx + edx + 0x8000]
sar ebx, 0x10
add ebx, 0x180
and ebx, 0x3ff
movzx ebx, byte [ebx + 0x59da90]
add ecx, 0xffffff80
mov ebp, 0xff
sub ebp, ebx
mov ebx, ecx
imul ecx, ecx, 0x1c5a2
imul ebx, ebx, 0x5819
sub eax, ebx
lea eax, [eax + edx + 0x8000]
sar eax, 0x10
add eax, 0x180
lea ecx, [ecx + edx + 0x8000]
mov dword [edi], ebp
and eax, 0x3ff
movzx eax, byte [eax + 0x59da90]
sar ecx, 0x10
add ecx, 0x180
and ecx, 0x3ff
mov ebx, 0xff
sub ebx, eax
mov eax, dword [esp + 0x28]
mov dword [eax], ebx
movzx edx, byte [ecx + 0x59da90]
mov ebx, dword [esp + 0x14]
mov ecx, 0xff
sub ecx, edx
mov dword [ebx], ecx
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 0x1c]
inc ecx
add eax, 4
add ebx, 4
add edi, 4
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ecx
cmp ecx, edx
jl 0x46f2b0
mov eax, dword [esp + 0x1c]
inc dword [esp + 0x10]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [esi + 0x20]
jl 0x46f270
xor ecx, ecx
mov eax, dword [esp + 0x20]
add eax, dword [esi + 0x1c]
mov dword [esp + 0x20], eax
cmp eax, dword [esi + 0x24]
jl 0x46ec90
mov eax, dword [esp + 0x24]
add eax, dword [esi + 0x20]
mov dword [esp + 0x24], eax
cmp eax, dword [esi + 0x28]
jl 0x46ec80
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x188]
pop esi
xor ecx, esp
call fcn.00511afd
add esp, 0x188
ret