Function at 0x40dc4f
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0x10
mov eax, 0x55b949
call fcn.00531d28
mov esi, dword [ebp + 8]
mov edi, dword [esi + 0xc]
push 0x566308
push 0x20
pop ebx
lea eax, [esi + 0x1c]
push ebx
push eax
call fcn.00531f88
fld dword [0x566304]
fstp dword [esi + 0x368]
mov dword [esi + 0x18], 0xa
movzx eax, byte [edi + 3]
and eax, 0xf
add esp, 0xc
dec eax
cmp eax, 0xc
ja case.0x40dc9a.7
jmp dword [eax*4 + 0x40e793]
push 0x566238
lea eax, [esi + 0x2e4]
push ebx
push eax
call fcn.00415470
fld dword [0x566300]
mov dword [esi + 0x304], 0x20001
jmp 0x40dd99
push str.UDIMM
lea eax, [esi + 0x2e4]
push ebx
push eax
call fcn.00415470
fld dword [0x566300]
mov dword [esi + 0x304], 0x20002
jmp 0x40dd99
push str.SO_DIMM
jmp 0x40dd7c
push str.LRDIMM
lea eax, [esi + 0x2e4]
push ebx
push eax
call fcn.00415470
fld dword [0x566300]
mov dword [esi + 0x304], 0x20004
jmp 0x40dd99
push str.Mini_RDIMM
lea eax, [esi + 0x2e4]
push ebx
push eax
call fcn.00415470
mov dword [esi + 0x304], 0x20001
jmp 0x40dd9f
push str.Mini_UDIMM
lea eax, [esi + 0x2e4]
push ebx
push eax
call fcn.00415470
fld dword [0x5660f4]
jmp 0x40dce0
push str.72b_SO_RDIMM
lea eax, [esi + 0x2e4]
push ebx
push eax
call fcn.00415470
jmp 0x40dd9f
push str.72b_SO_DIMM
jmp 0x40dd7c
push str.16b_SO_DIMM
jmp 0x40dd7c
push 0x5662b4
lea eax, [esi + 0x2e4]
push ebx
push eax
call fcn.00415470
fld dword [0x5662b0]
mov dword [esi + 0x304], 0x20003
fstp dword [esi + 0x308]
add esp, 0xc
or eax, 0xffffffff
mov dword [ebp + 8], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], eax
movzx eax, byte [edi + 4]
and eax, 0xf
cmp eax, 9
ja case.default.0x40ddbd
jmp dword [eax*4 + 0x40e7c7]
mov dword [ebp + 8], 0x100
jmp case.default.0x40ddbd
mov dword [ebp + 8], 0x200
jmp case.default.0x40ddbd
mov dword [ebp + 8], 0x400
jmp case.default.0x40ddbd
mov dword [ebp + 8], 0x800
jmp case.default.0x40ddbd
mov dword [ebp + 8], 0x1000
jmp case.default.0x40ddbd
mov dword [ebp + 8], 0x2000
jmp case.default.0x40ddbd
mov dword [ebp + 8], 0x4000
jmp case.default.0x40ddbd
mov dword [ebp + 8], 0x8000
jmp case.default.0x40ddbd
mov dword [ebp + 8], 0x3000
jmp case.default.0x40ddbd
mov dword [ebp + 8], 0x6000
movzx eax, byte [edi + 6]
push 7
shr eax, 4
pop edx
and eax, edx
cmp eax, edx
ja case.default.0x40de2c
jmp dword [eax*4 + 0x40e7ef]
mov dword [ebp - 0x10], 1
jmp case.default.0x40de2c
mov dword [ebp - 0x10], 2
jmp case.default.0x40de2c
mov dword [ebp - 0x10], 3
jmp case.default.0x40de2c
mov dword [ebp - 0x10], 4
jmp case.default.0x40de2c
mov dword [ebp - 0x10], 5
jmp case.default.0x40de2c
mov dword [ebp - 0x10], 6
jmp case.default.0x40de2c
mov dword [ebp - 0x10], edx
jmp case.default.0x40de2c
mov dword [ebp - 0x10], 8
movzx ecx, byte [edi + 0xc]
mov eax, ecx
and eax, edx
sub eax, 0
je 0x40dea2
dec eax
je 0x40de99
dec eax
je 0x40de90
dec eax
jne 0x40dea9
mov dword [ebp - 0x1c], ebx
jmp 0x40dea9
mov dword [ebp - 0x1c], 0x10
jmp 0x40dea9
mov dword [ebp - 0x1c], 8
jmp 0x40dea9
mov dword [ebp - 0x1c], 4
shr ecx, 3
and ecx, edx
cmp ecx, edx
ja case.default.0x40deb2
jmp dword [ecx*4 + 0x40e80f]
mov dword [esi + 0x320], 1
jmp case.default.0x40deb2
mov dword [esi + 0x320], 2
jmp case.default.0x40deb2
mov dword [esi + 0x320], 3
jmp case.default.0x40deb2
mov dword [esi + 0x320], 4
jmp case.default.0x40deb2
mov dword [esi + 0x320], 5
jmp case.default.0x40deb2
mov dword [esi + 0x320], 6
jmp case.default.0x40deb2
mov dword [esi + 0x320], edx
jmp case.default.0x40deb2
mov dword [esi + 0x320], 8
mov ebx, dword [esi + 0x320]
push ebx
call fcn.00403350
pop ecx
test eax, eax
je 0x40df44
push dword [ebp - 0x10]
call fcn.00403350
pop ecx
test eax, eax
je 0x40df44
mov al, byte [edi + 6]
and al, 3
cmp al, 2
jne 0x40df44
imul ebx, dword [ebp - 0x10]
mov dword [esi + 0x320], ebx
movzx eax, byte [edi + 0xd]
and eax, 7
sub eax, 0
je 0x40df74
dec eax
je 0x40df6b
dec eax
je 0x40df62
dec eax
jne 0x40df7b
mov dword [ebp - 0x18], 0x40
jmp 0x40df7b
mov dword [ebp - 0x18], 0x20
jmp 0x40df7b
mov dword [ebp - 0x18], 0x10
jmp 0x40df7b
mov dword [ebp - 0x18], 8
push dword [ebp + 8]
call fcn.00403350
pop ecx
test eax, eax
je 0x40dfd4
push dword [ebp - 0x18]
call fcn.00403350
pop ecx
test eax, eax
je 0x40dfd4
push dword [ebp - 0x1c]
call fcn.00403350
pop ecx
test eax, eax
je 0x40dfd4
mov ebx, dword [esi + 0x320]
push ebx
call fcn.00403350
pop ecx
test eax, eax
je 0x40dfd4
mov eax, dword [ebp - 0x18]
cdq
idiv dword [ebp - 0x1c]
mov ecx, eax
mov eax, dword [ebp + 8]
cdq
and edx, 7
add eax, edx
sar eax, 3
imul ecx, eax
imul ecx, ebx
mov dword [esi + 0x2dc], ecx
movzx eax, byte [edi + 0xe]
shr eax, 7
mov dword [esi + 0x374], eax
movsx eax, byte [edi + 0x7d]
mov dword [ebp + 8], eax
movzx eax, byte [edi + 0x12]
fild dword [ebp + 8]
push ecx
fmul qword [0x566018]
fstp dword [ebp + 8]
fld dword [ebp + 8]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fmul qword [0x5662a8]
faddp st(1)
fstp dword [ebp + 8]
fld dword [ebp + 8]
fdivr qword [0x5662a0]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fdiv qword [0x565fb0]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [esp]
call fcn.00413420
mov ecx, eax
imul eax, eax, 0x64
cdq
push 3
pop ebx
idiv ebx
mov dword [esi + 0x330], eax
mov eax, ecx
imul eax, eax, 0x640
cdq
idiv ebx
mov dword [esi + 0x32c], eax
mov eax, ecx
imul eax, eax, 0xc8
cdq
mov ecx, ebx
idiv ecx
push eax
push 0x5660cc
lea eax, [esi + 0x3c]
push 0x20
push eax
call fcn.00415470
add esp, 0x14
test byte [edi + 0x14], 1
je 0x40e0b0
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
and dword [ebp - 4], 0
test eax, eax
je 0x40e095
mov ecx, eax
call fcn.004047aa
jmp 0x40e097
xor eax, eax
fld dword [0x56608c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 2
je 0x40e0f0
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x40e0d5
mov ecx, eax
call fcn.004047aa
jmp 0x40e0d7
xor eax, eax
fld dword [0x566088]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 4
je 0x40e130
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x40e115
mov ecx, eax
call fcn.004047aa
jmp 0x40e117
xor eax, eax
fld dword [0x566084]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 8
je 0x40e16c
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], ebx
test eax, eax
je 0x40e151
mov ecx, eax
call fcn.004047aa
jmp 0x40e153
xor eax, eax
fld dword [0x566080]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 0x10
je 0x40e1ac
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 4
test eax, eax
je 0x40e191
mov ecx, eax
call fcn.004047aa
jmp 0x40e193
xor eax, eax
fld dword [0x56607c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 0x20
je 0x40e1ec
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 5
test eax, eax
je 0x40e1d1
mov ecx, eax
call fcn.004047aa
jmp 0x40e1d3
xor eax, eax
fld dword [0x566078]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 0x40
je 0x40e22c
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 6
test eax, eax
je 0x40e211
mov ecx, eax
call fcn.004047aa
jmp 0x40e213
xor eax, eax
fld dword [0x566074]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 0x80
je 0x40e26c
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 7
test eax, eax
je 0x40e251
mov ecx, eax
call fcn.004047aa
jmp 0x40e253
xor eax, eax
fld dword [0x566070]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
mov al, byte [edi + 0x15]
test al, al
je 0x40e473
test al, 1
je 0x40e2b5
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 8
test eax, eax
je 0x40e29a
mov ecx, eax
call fcn.004047aa
jmp 0x40e29c
xor eax, eax
fld dword [0x56606c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 2
je 0x40e2f5
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 9
test eax, eax
je 0x40e2da
mov ecx, eax
call fcn.004047aa
jmp 0x40e2dc
xor eax, eax
fld dword [0x566068]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 4
je 0x40e335
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xa
test eax, eax
je 0x40e31a
mov ecx, eax
call fcn.004047aa
jmp 0x40e31c
xor eax, eax
fld dword [0x566064]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 8
je 0x40e375
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xb
test eax, eax
je 0x40e35a
mov ecx, eax
call fcn.004047aa
jmp 0x40e35c
xor eax, eax
fld dword [0x566060]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 0x10
je 0x40e3b3
push 0xc
pop ebx
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], ebx
test eax, eax
je 0x40e398
mov ecx, eax
call fcn.004047aa
jmp 0x40e39a
xor eax, eax
fld dword [0x5660c8]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 0x20
je 0x40e3f3
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xd
test eax, eax
je 0x40e3d8
mov ecx, eax
call fcn.004047aa
jmp 0x40e3da
xor eax, eax
fld dword [0x5660c4]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 0x40
je 0x40e433
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xe
test eax, eax
je 0x40e418
mov ecx, eax
call fcn.004047aa
jmp 0x40e41a
xor eax, eax
fld dword [0x5660c0]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 0x80
je 0x40e473
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xf
test eax, eax
je 0x40e458
mov ecx, eax
call fcn.004047aa
jmp 0x40e45a
xor eax, eax
fld dword [0x5660bc]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
mov al, byte [edi + 0x16]
test al, al
je 0x40e4f8
test al, 1
je 0x40e4b8
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x10
test eax, eax
je 0x40e49d
mov ecx, eax
call fcn.004047aa
jmp 0x40e49f
xor eax, eax
fld dword [0x5660b8]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x16], 2
je 0x40e4f8
push 0xc
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x11
test eax, eax
je 0x40e4dd
mov ecx, eax
call fcn.004047aa
jmp 0x40e4df
xor eax, eax
fld dword [0x5660b4]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
movsx eax, byte [edi + 0x7b]
and dword [ebp - 0x10], 0
mov dword [ebp + 8], eax
movzx eax, byte [edi + 0x18]
fild dword [ebp + 8]
lea ecx, [ebp - 0x14]
fmul qword [0x566018]
fstp dword [ebp + 8]
fld dword [ebp + 8]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
mov eax, dword [esi + 0x338]
mov dword [ebp - 0x14], eax
fmul qword [0x5662a8]
faddp st(1)
fstp dword [ebp - 0x18]
call fcn.00404ce9
jmp 0x40e5a3
fldz
fcomp dword [ebx + 4]
fnstsw ax
test ah, 5
jp 0x40e59b
fld dword [ebx + 4]
push ecx
fmul qword [0x566298]
fdiv dword [ebp - 0x18]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [esp]
call fcn.00413420
mov dword [ebp + 8], eax
fild dword [ebp + 8]
pop ecx
fmul qword [0x565fb0]
fdiv qword [0x566218]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [ebx + 8]
fild dword [esi + 0x330]
fstp dword [ebp - 0x1c]
fld dword [ebp + 8]
fld dword [ebp - 0x1c]
fcompp
fnstsw ax
test ah, 5
jp 0x40e59b
fld dword [ebp - 0x1c]
fstp dword [ebx + 8]
lea ecx, [ebp - 0x14]
call fcn.005105ae
mov ebx, eax
test ebx, ebx
jne 0x40e53a
movsx eax, byte [edi + 0x7a]
mov dword [ebp + 8], eax
lea eax, [esi + 0x33c]
fild dword [ebp + 8]
fld qword [0x566018]
fmul st(1), st(0)
fxch st(1)
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [eax]
movzx ecx, byte [edi + 0x19]
mov dword [ebp - 0x1c], ecx
fild dword [ebp - 0x1c]
fld qword [0x5662a8]
fmul st(1), st(0)
fld dword [ebp + 8]
faddp st(2)
fxch st(1)
fstp dword [eax]
movsx eax, byte [edi + 0x79]
mov dword [ebp + 8], eax
lea eax, [esi + 0x344]
fild dword [ebp + 8]
fmulp st(2)
fxch st(1)
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [eax]
movzx ecx, byte [edi + 0x1a]
mov dword [ebp - 0x1c], ecx
fild dword [ebp - 0x1c]
fmul st(1)
fadd dword [ebp + 8]
fstp dword [eax]
movzx eax, byte [edi + 0x1b]
movzx ecx, byte [edi + 0x1c]
and eax, 0xf
shl eax, 8
add eax, ecx
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fmul st(1)
fstp dword [esi + 0x348]
movzx eax, byte [edi + 0x1b]
movzx ecx, byte [edi + 0x1d]
shr eax, 4
shl eax, 8
add eax, ecx
cmp dword [esi + 0x10], 0x200
mov dword [ebp + 8], eax
fimul dword [ebp + 8]
fstp dword [esi + 0x34c]
jl 0x40e78b
movzx ebx, byte [edi + 0x140]
and ebx, 0x7f
cmp ebx, 0xf
jle 0x40e66c
push 0xf
pop ebx
xor eax, eax
test ebx, ebx
jle 0x40e683
push ebx
lea eax, [esi + 0x5c]
push 0x7f
push eax
call fcn.00530830
add esp, 0xc
mov eax, ebx
mov cl, byte [edi + 0x141]
mov byte [eax + esi + 0x5c], cl
lea eax, [esi + 0x9c]
push eax
lea eax, [esi + 0x5c]
push eax
call fcn.004071fd
mov cl, byte [edi + 0x143]
mov al, cl
shr al, 4
mov dl, 0xa
imul dl
and cl, 0xf
add al, cl
mov byte [esi + 0x364], al
mov cl, byte [edi + 0x144]
mov al, cl
shr al, 4
imul dl
and cl, 0xf
add al, cl
mov byte [esi + 0x365], al
movzx eax, byte [edi + 0x145]
movzx ecx, byte [edi + 0x146]
shl eax, 8
add eax, ecx
movzx ecx, byte [edi + 0x147]
shl eax, 8
add eax, ecx
movzx ecx, byte [edi + 0x148]
shl eax, 8
add eax, ecx
push eax
push 0x564894
mov dword [esi + 0x2e0], eax
lea eax, [esi + 0x2bc]
push 0x20
push eax
call fcn.00415470
add esp, 0x18
lea ecx, [esi + 0x29c]
lea eax, [edi + 0x149]
mov dword [ebp + 8], 0x14
mov dl, byte [eax]
cmp dl, 0xff
sete bl
dec bl
and bl, dl
inc eax
mov byte [ecx], bl
inc ecx
dec dword [ebp + 8]
jne 0x40e72a
mov byte [esi + 0x2b0], 0
movzx ebx, byte [edi + 0x15e]
and ebx, 0x7f
cmp ebx, 0xf
jle 0x40e758
push 0xf
pop ebx
xor eax, eax
test ebx, ebx
jle 0x40e76f
push ebx
lea eax, [esi + 0x7c]
push 0x7f
push eax
call fcn.00530830
add esp, 0xc
mov eax, ebx
mov cl, byte [edi + 0x15f]
mov byte [eax + esi + 0x7c], cl
lea eax, [esi + 0x19c]
push eax
add esi, 0x7c
push esi
call fcn.004071fd
pop ecx
pop ecx
call fcn.00531e00
ret 4