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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd54
mov eax, dword [ebp + 8]
test eax, eax
push ebx
push esi
push edi
mov dword [esp + 0x10], ecx
je 0x46d9c0
mov eax, dword [ecx + 0x38]
mov ecx, dword [eax + 0x48]
mov edx, dword [ecx + 0x24]
push edx
call dword [0x68a0b4]
lea ebx, [ebx]
mov edi, dword [esp + 0x10]
mov edx, dword [edi + 0x2c]
xor esi, esi
test edx, edx
mov dword [esp + 0x28], esi
mov dword [esp + 0x1c], esi
je 0x46e337
lea esp, [esp]
mov eax, dword [esp + 0x1c]
shl eax, 2
mov edi, 0xffffffdc
xor ecx, ecx
sub edi, edx
mov dword [esp + 0x14], eax
lea eax, [edx + 0x24]
mov dword [esp + 0x28], edi
jmp 0x46da00
mov edi, dword [eax]
test edi, edi
je 0x46da2a
test esi, esi
je 0x46da1a
mov ebx, dword [esp + 0x14]
mov ebx, dword [ebx + esi + 0x24]
mov edi, dword [edi + 0x24]
cmp edi, dword [ebx + 0x24]
jae 0x46da2a
mov edi, dword [esp + 0x28]
add edi, eax
mov esi, edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], edi
inc ecx
add eax, 4
cmp ecx, 2
jl 0x46da00
mov edx, dword [edx]
test edx, edx
jne 0x46d9e0
test esi, esi
mov dword [esp + 0x28], esi
je 0x46e333
cmp dword [esp + 0x1c], 1
jne 0x46da58
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x24]
mov dword [esi + 0x24], ecx
mov dword [esi + 0x28], eax
mov edx, dword [esi + 0x24]
mov edi, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x14], edx
cmp dword [esi + 0x30], 2
sete al
mov dword [edi + 0x24], eax
test eax, eax
mov eax, dword [edi + 0x38]
mov ecx, dword [eax + 0x48]
mov edx, dword [ecx + 0x24]
je 0x46da80
push 2
jmp 0x46da82
push 1
push edx
call dword [0x68a130]
mov eax, dword [ebp + 8]
test eax, eax
jne 0x46daa0
mov eax, dword [edi + 0x38]
mov ecx, dword [eax + 0x48]
mov edx, dword [ecx + 0x24]
push edx
call dword [0x68a0b4]
lea eax, [esp + 0x2c]
push eax
call fcn.00443a90
add esp, 4
lea ecx, [ecx]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x10]
push 0
push ecx
mov ecx, dword [eax + 0x38]
push edx
mov edx, dword [ecx + 0x48]
mov eax, dword [edx + 0x24]
push eax
call dword [0x68a12c]
mov edi, edi
lea ecx, [esp + 0x2c]
push ecx
lea ebx, [esi + 8]
push ebx
call fcn.00443c50
lea edx, [esp + 0x34]
push edx
lea eax, [esi + 0x10]
push eax
call fcn.00443c50
lea ecx, [esp + 0x3c]
push ecx
lea edi, [esi + 0x18]
push edi
call fcn.00443c50
mov eax, dword [esi + 0x20]
add esp, 0x18
test eax, eax
je 0x46db21
mov edx, dword [esi + 0x1c]
mov ebx, dword [esp + 0x10]
mov eax, dword [edi]
mov ecx, dword [ebx + 0x38]
push edx
mov edx, dword [ecx + 0x48]
push eax
mov eax, dword [edx + 0x24]
push eax
call dword [0x68a128]
jmp 0x46db7f
lea ecx, [esp + 0x158]
push ecx
push ebx
call fcn.004252c0
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 0x38]
add esp, 8
xor eax, eax
jmp 0x46db40
mov edx, dword [esp + eax + 0x160]
mov dword [esp + eax + 0x124], edx
mov edx, dword [esp + eax + 0x164]
mov dword [esp + eax + 0x128], edx
add eax, 8
cmp eax, 0x18
jl 0x46db40
mov ecx, dword [ecx + 0x48]
mov edx, dword [ecx + 0x24]
push 3
lea eax, [esp + 0x128]
push eax
push edx
call dword [0x68a124]
mov ebx, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x18]
push edi
mov ecx, ebx
mov dword [esi + 0x24], 0
call fcn.0046d8a0
mov esi, eax
test esi, esi
jne 0x46dad0
push eax
push edi
mov ecx, ebx
call fcn.0046d8a0
mov esi, eax
test esi, esi
jne 0x46dab0
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x38]
mov edx, dword [ecx + 0x48]
mov eax, dword [edx + 0x24]
push eax
call dword [0x68a0b8]
mov eax, dword [ebp + 8]
test eax, eax
jne 0x46d9c0
mov edx, edi
mov cl, byte [edx + 0x2e]
cmp cl, 3
je 0x46dbe2
cmp cl, 4
je 0x46dbe2
xor al, al
jmp 0x46dbe4
mov al, 1
mov bl, byte [edx + 0x2c]
test bl, bl
je 0x46dbf6
cmp word [edx + 0xe], 0
je 0x46d9c0
test al, al
jne 0x46d9c0
mov eax, dword [esp + 0x14]
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov esi, eax
shr esi, 0x10
xor edi, edi
cmp esi, 0xff
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
jge 0x46dc65
cmp esi, edi
jle 0x46dc67
movzx eax, ax
imul eax, eax, 0xff
cdq
idiv esi
mov word [esp + 0x26], 0xff
mov word [esp + 0x24], ax
mov eax, dword [esp + 0x20]
shr eax, 0x10
imul eax, eax, 0xff
cdq
idiv esi
mov word [esp + 0x22], ax
movzx eax, word [esp + 0x20]
imul eax, eax, 0xff
cdq
idiv esi
mov word [esp + 0x20], ax
jmp 0x46dc78
cmp esi, edi
jne 0x46dc78
mov word [esp + 0x24], di
mov word [esp + 0x22], di
mov word [esp + 0x20], di
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x2c]
cmp eax, edi
je 0x46dca4
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x22]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x18]
push ecx
mov ecx, dword [edx + 0x38]
push eax
call fcn.0051f150
jmp 0x46d9c0
test cl, cl
jne 0x46dcc8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x22]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [eax + 0x38]
push edx
call fcn.0051f1d0
jmp 0x46d9c0
cmp cl, 1
mov ebx, 2
jne 0x46dd0f
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x4c]
mov eax, dword [edx + 4]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov esi, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
sub edx, ecx
lea esp, [esp]
mov edi, edx
mov ecx, ebx
sar edi, cl
cmp edi, esi
jl 0x46dd0c
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
sub edi, ecx
mov ecx, ebx
sar edi, cl
cmp edi, eax
jge 0x46dd0f
dec ebx
jne 0x46dcf0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 0x38]
push eax
mov edi, 6
mov byte [esp + 0x1f], 0
call fcn.0051f2b0
test al, al
je 0x46dd38
mov edi, 7
mov byte [esp + 0x1b], 1
push 0xa4
call fcn.00446b60
add esp, 4
test eax, eax
je 0x46d9c0
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
sub edx, ecx
push 0
mov ecx, ebx
sar edx, cl
mov ecx, dword [esp + 0x30]
push edi
push edx
mov edx, dword [esp + 0x3c]
sub edx, ecx
mov ecx, ebx
sar edx, cl
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [ecx + 0x34]
push edx
mov ecx, eax
call fcn.00508640
mov esi, eax
test esi, esi
mov dword [esp + 0x1c], esi
je 0x46d9c0
mov eax, dword [esi + 0x1c]
test eax, eax
jne 0x46de19
mov eax, dword [esi + 0x50]
test eax, eax
jne 0x46de19
mov ebx, 3
test esi, esi
je 0x46ddb6
mov ecx, esi
call fcn.005086b0
push esi
call fcn.006058d0
add esp, 4
push 0xa4
call fcn.00446b60
add esp, 4
test eax, eax
je 0x46df51
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
sub edx, ecx
push 0
mov ecx, ebx
sar edx, cl
mov ecx, dword [esp + 0x30]
push edi
push edx
mov edx, dword [esp + 0x3c]
sub edx, ecx
mov ecx, ebx
sar edx, cl
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [ecx + 0x34]
push edx
mov ecx, eax
call fcn.00508640
mov esi, eax
test esi, esi
je 0x46de0f
mov eax, dword [esi + 0x1c]
test eax, eax
jne 0x46de15
mov eax, dword [esi + 0x50]
test eax, eax
jne 0x46de15
inc ebx
cmp ebx, 7
jl 0x46dda2
mov dword [esp + 0x1c], esi
test esi, esi
je 0x46d9c0
mov eax, dword [esi + 0x1c]
test eax, eax
jne 0x46de33
mov eax, dword [esi + 0x50]
test eax, eax
je 0x46e31e
mov ecx, esi
call fcn.005075f0
test eax, eax
je 0x46e31e
mov edi, dword [esp + 0x10]
mov eax, dword [edi + 0x34]
mov ecx, dword [eax + 0x1c]
push ecx
lea ecx, [esp + 0x17c]
call fcn.00481120
mov edx, dword [edi + 0x34]
push 1
push 0
push esi
lea ecx, [esp + 0x184]
mov dword [esp + 0x238], edx
call fcn.0047c910
lea eax, [esp + 0x84]
xor esi, esi
push eax
lea ecx, [esp + 0x17c]
mov dword [esp + 0x88], esi
call fcn.00482e50
lea ecx, [esp + 0x178]
call fcn.004746d0
push 0x47c660
push 2
push 0x24
lea ecx, [esp + 0x94]
push ecx
call fcn.00401020
lea edx, [esp + 0x178]
push edx
lea ecx, [esp + 0xd4]
call fcn.00472a10
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0xd8], eax
mov al, byte [edx + 0x2e]
cmp al, 2
mov dword [esp + 0xf4], esi
mov dword [esp + 0xdc], ecx
jne 0x46df58
push 2
lea ecx, [esp + 0xd4]
call fcn.00472b40
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 0x4c]
mov edi, dword [esp + 0x11c]
mov ecx, 0x26
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x11c]
mov dl, byte [ecx + 0x3c]
xor eax, eax
test dl, dl
jbe 0x46df45
jmp 0x46df30
mov byte [ecx + eax*4 + 0x53], 0xff
mov ecx, dword [esp + 0x11c]
movzx edx, byte [ecx + 0x3c]
inc eax
cmp eax, edx
jl 0x46df30
mov dword [ecx + 0x90], 0
jmp 0x46df7f
xor esi, esi
jmp 0x46de0f
cmp al, 1
jne 0x46df83
push 1
lea ecx, [esp + 0xd4]
call fcn.00472b40
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 0x4c]
mov edi, dword [esp + 0x11c]
mov ecx, 0x22
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x10]
mov ecx, dword [edi + 0x34]
push ecx
lea edx, [esp + 0x140]
push edx
call fcn.00444d20
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x38]
add esp, 8
test eax, eax
je 0x46dfc0
call fcn.00472ae0
mov ecx, dword [edi + 0x34]
push ecx
lea edx, [esp + 0x140]
push edx
lea ecx, [eax + 0x10]
push ecx
push eax
call fcn.00445130
add esp, 0x10
mov esi, dword [esp + 0x10]
lea edx, [esp + 0x3c]
push edx
add esi, 4
mov ecx, 7
lea edi, [esp + 0x40]
lea eax, [esp + 0x140]
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, edx
push ecx
call fcn.00444910
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x58]
mov edx, dword [esp + 0x38]
sub ecx, eax
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 0x34]
sub esi, edx
add esp, 0xc
test ecx, ecx
mov dword [esp + 0x4c], esi
je 0x46e063
call fcn.004ce9b0
test al, al
je 0x46e063
mov edx, 1
mov ecx, ebx
shl edx, cl
mov dword [esp + 0x54], 1
xor esi, esi
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
fdivr dword [0x68a9c8]
fld dword [esp + 0x3c]
fmul st(1)
fstp dword [esp + 0x3c]
fld dword [esp + 0x40]
fmul st(1)
fstp dword [esp + 0x40]
fld dword [esp + 0x44]
fmul st(1)
fstp dword [esp + 0x44]
fmul dword [esp + 0x48]
fstp dword [esp + 0x48]
jmp 0x46e093
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov ecx, ebx
sar esi, cl
sar edi, cl
sar edx, cl
sar eax, cl
mov dword [esp + 0x40], esi
xor esi, esi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x54], esi
mov edi, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov ecx, ebx
sar edi, cl
lea eax, [esp + 0x3c]
push eax
push esi
mov dword [esp + 0x54], edi
mov edi, dword [esp + 0x18]
sar edx, cl
mov ecx, dword [edi]
push esi
push esi
push ecx
lea ecx, [esp + 0x2b4]
mov dword [esp + 0x64], edx
call fcn.004b6550
push esi
push esi
push 1
lea eax, [esp + 0xdc]
lea edx, [esp + 0x184]
push eax
lea ecx, [esp + 0x2b0]
mov dword [esp + 0x318], edx
call fcn.004bab40
lea ecx, [esp + 0x2a0]
call fcn.004b6690
mov eax, dword [esp + 0x20c]
mov edx, dword [esp + 0x208]
lea ecx, [esp + 0xac]
mov dword [esp + 0x88], ecx
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x200]
lea ecx, [esp + 0x68]
mov dword [esp + 0x5c], edx
push ecx
lea edx, [esp + 0x64]
mov dword [esp + 0x64], eax
mov dword [esp + 0x5c], eax
push edx
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0xb8], esi
call fcn.004250d0
mov cx, word [esp + 0x74]
mov dx, word [esp + 0x78]
mov ax, word [esp + 0x7c]
mov word [esp + 0xa4], cx
mov cx, word [esp + 0x80]
mov word [esp + 0xaa], cx
mov word [esp + 0xa6], dx
mov dx, word [esp + 0x84]
mov word [esp + 0xa8], ax
mov ax, word [esp + 0x88]
lea ecx, [esp + 0x74]
push ecx
mov word [esp + 0xb0], dx
mov word [esp + 0xb2], ax
call fcn.00425600
cmp eax, 1
mov eax, dword [esp + 0x214]
mov dword [esp + 0x70], eax
mov dword [esp + 0x68], eax
setle dl
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x74]
mov byte [esp + 0xb8], dl
push ecx
lea edx, [esp + 0x70]
push edx
call fcn.004250d0
mov ax, word [esp + 0x84]
mov cx, word [esp + 0x88]
mov dx, word [esp + 0x8c]
mov word [esp + 0xd8], ax
mov ax, word [esp + 0x90]
mov word [esp + 0xda], cx
mov word [esp + 0xdc], dx
mov word [esp + 0xde], ax
mov cx, word [esp + 0x94]
mov dx, word [esp + 0x98]
lea eax, [esp + 0x84]
push eax
mov word [esp + 0xe4], cx
mov word [esp + 0xe6], dx
call fcn.00425600
add esp, 0x20
cmp eax, 1
setle cl
lea edx, [esp + 0xd0]
push esi
mov byte [esp + 0xcc], cl
mov ecx, edx
push esi
mov eax, edx
mov dword [esp + 0xbc], edx
push ecx
lea edx, [esp + 0x94]
push edx
lea ecx, [esp + 0x188]
mov byte [esp + 0xda], 0
mov byte [esp + 0xb6], 0
mov byte [esp + 0xd9], 1
mov byte [esp + 0xb5], 1
mov dword [esp + 0xa0], eax
mov dword [esp + 0xc8], esi
mov dword [esp + 0xa4], esi
call fcn.00482600
lea ecx, [esp + 0x178]
call fcn.00482840
lea ecx, [esp + 0xd0]
call fcn.0047c7b0
mov al, byte [esp + 0x1b]
test al, al
mov esi, dword [esp + 0x1c]
je 0x46e2ed
mov eax, dword [esp + 0x14]
mov edx, dword [edi + 0x34]
push eax
push esi
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [edi + 0x38]
push edx
call fcn.0051f2d0
jmp 0x46e2fb
mov ecx, dword [edi + 0x38]
push esi
lea eax, [esp + 0x30]
push eax
call fcn.0051f230
mov ecx, esi
call fcn.005076c0
lea ecx, [esp + 0xd0]
call fcn.004805e0
lea ecx, [esp + 0x178]
call fcn.0047c850
mov esi, dword [esp + 0x1c]
mov ecx, esi
call fcn.005086b0
push esi
call fcn.006058d0
add esp, 4
jmp 0x46d9c0
mov edi, dword [esp + 0x10]
mov eax, dword [ebp + 8]
test eax, eax
je 0x46e360
mov ecx, dword [edi + 0x38]
mov edx, dword [ecx + 0x48]
mov eax, dword [edx + 0x24]
push eax
call dword [0x68a0b8]
mov ecx, dword [edi + 0x38]
mov edx, dword [ecx + 0x48]
mov eax, dword [edx + 0x24]
push 1
push eax
call dword [0x68a100]
mov eax, dword [edi + 0x28]
test eax, eax
je 0x46e379
mov esi, dword [eax + 4]
push eax
call fcn.006058d0
add esp, 4
test esi, esi
mov eax, esi
jne 0x46e367
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4