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

Disassembly:
push 0x14
mov eax, 0x55badd
call fcn.00531d28
mov esi, dword [ebp + 8]
mov edi, dword [esi + 0xc]
push 0x566388
lea ebx, [esi + 0x1c]
push 0x20
push ebx
call fcn.00531f88
fld dword [0x5661e4]
fstp dword [esi + 0x368]
add esp, 0xc
mov dword [esi + 0x18], 9
test byte [edi + 6], 2
je 0x40f3ed
fld dword [0x566384]
push str.DDR3L
push 0x20
fstp dword [esi + 0x368]
push ebx
call fcn.00531f88
add esp, 0xc
test byte [edi + 6], 4
je 0x40f40f
fld dword [0x566304]
push str.DDR3L
push 0x20
fstp dword [esi + 0x368]
push ebx
call fcn.00531f88
add esp, 0xc
movzx eax, byte [edi + 3]
and eax, 0xf
dec eax
je 0x40f4f1
dec eax
je 0x40f4d2
dec eax
je 0x40f4ad
dec eax
je 0x40f488
dec eax
je 0x40f460
dec eax
jne 0x40f51d
push str.Mini_UDIMM
lea eax, [esi + 0x2e4]
push 0x20
push eax
call fcn.00415470
fld dword [0x5660f0]
mov dword [esi + 0x304], 0x20006
jmp 0x40f514
push str.Mini_RDIMM
lea eax, [esi + 0x2e4]
push 0x20
push eax
call fcn.00415470
fld dword [0x5660f0]
mov dword [esi + 0x304], 0x20005
jmp 0x40f514
push 0x566370
lea eax, [esi + 0x2e4]
push 0x20
push eax
call fcn.00415470
fld dword [0x56636c]
mov dword [esi + 0x304], 0x20004
jmp 0x40f514
push str.SO_DIMM
lea eax, [esi + 0x2e4]
push 0x20
push eax
call fcn.00415470
fld dword [0x566368]
mov dword [esi + 0x304], 0x20003
jmp 0x40f514
push str.UDIMM
lea eax, [esi + 0x2e4]
push 0x20
push eax
call fcn.00415470
mov dword [esi + 0x304], 0x20002
jmp 0x40f50e
push 0x566238
lea eax, [esi + 0x2e4]
push 0x20
push eax
call fcn.00415470
mov dword [esi + 0x304], 0x20001
fld dword [0x566300]
fstp dword [esi + 0x308]
add esp, 0xc
movzx eax, byte [edi + 4]
push 7
shr eax, 4
pop ebx
and eax, ebx
xor edx, edx
sub eax, edx
je 0x40f55c
dec eax
je 0x40f550
dec eax
je 0x40f544
dec eax
jne 0x40f566
mov dword [esi + 0x31c], 0x40
jmp 0x40f566
mov dword [esi + 0x31c], 0x20
jmp 0x40f566
mov dword [esi + 0x31c], 0x10
jmp 0x40f566
mov dword [esi + 0x31c], 8
movzx eax, byte [edi + 4]
or dword [ebp + 8], 0xffffffff
or dword [ebp - 0x10], 0xffffffff
or dword [ebp - 0x14], 0xffffffff
and eax, 0xf
cmp eax, 9
ja case.default.0x40f57e
jmp dword [eax*4 + 0x40fe07]
mov dword [ebp + 8], 0x100
jmp case.default.0x40f57e
mov dword [ebp + 8], 0x200
jmp case.default.0x40f57e
mov dword [ebp + 8], 0x400
jmp case.default.0x40f57e
mov dword [ebp + 8], 0x800
jmp case.default.0x40f57e
mov dword [ebp + 8], 0x1000
jmp case.default.0x40f57e
mov dword [ebp + 8], 0x2000
jmp case.default.0x40f57e
mov dword [ebp + 8], 0x4000
jmp case.default.0x40f57e
mov dword [ebp + 8], 0x8000
jmp case.default.0x40f57e
mov dword [ebp + 8], 0x10000
jmp case.default.0x40f57e
mov dword [ebp + 8], 0x20000
movzx eax, byte [edi + 7]
mov ecx, eax
and ecx, ebx
sub ecx, edx
je 0x40f60d
dec ecx
je 0x40f604
dec ecx
je 0x40f5fb
dec ecx
jne 0x40f614
mov dword [ebp - 0x14], 0x20
jmp 0x40f614
mov dword [ebp - 0x14], 0x10
jmp 0x40f614
mov dword [ebp - 0x14], 8
jmp 0x40f614
mov dword [ebp - 0x14], 4
shr eax, 3
and eax, ebx
sub eax, edx
je 0x40f659
dec eax
je 0x40f64d
dec eax
je 0x40f641
dec eax
je 0x40f635
dec eax
jne 0x40f663
mov dword [esi + 0x320], 8
jmp 0x40f663
mov dword [esi + 0x320], 4
jmp 0x40f663
mov dword [esi + 0x320], 3
jmp 0x40f663
mov dword [esi + 0x320], 2
jmp 0x40f663
mov dword [esi + 0x320], 1
movzx eax, byte [edi + 8]
and eax, ebx
sub eax, edx
je 0x40f691
dec eax
je 0x40f688
dec eax
je 0x40f67f
dec eax
jne 0x40f698
mov dword [ebp - 0x10], 0x40
jmp 0x40f698
mov dword [ebp - 0x10], 0x20
jmp 0x40f698
mov dword [ebp - 0x10], 0x10
jmp 0x40f698
mov dword [ebp - 0x10], 8
push dword [ebp + 8]
call fcn.00403350
pop ecx
test eax, eax
je 0x40f6f1
push dword [ebp - 0x10]
call fcn.00403350
pop ecx
test eax, eax
je 0x40f6f1
push dword [ebp - 0x14]
call fcn.00403350
pop ecx
test eax, eax
je 0x40f6f1
mov ebx, dword [esi + 0x320]
push ebx
call fcn.00403350
pop ecx
test eax, eax
je 0x40f6f1
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x14]
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
mov al, byte [edi + 0xb]
test al, al
jbe 0x40f70f
movzx ecx, byte [edi + 0xa]
mov dword [ebp + 8], ecx
movzx eax, al
fild dword [ebp + 8]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fdivp st(1)
jmp 0x40f715
fld dword [0x5660e8]
movzx eax, byte [edi + 0xc]
fstp dword [ebp - 0x14]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fmul dword [ebp - 0x14]
fst dword [ebp + 8]
fld dword [ebp + 8]
fdivr qword [0x564990]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fld qword [0x5660d8]
fadd st(1), st(0)
fxch st(1)
call fcn.00531ff0
fld dword [ebp + 8]
fadd st(0), st(0)
mov dword [esi + 0x330], eax
fmul qword [0x566010]
fdiv qword [0x565fb0]
fadd st(1)
call fcn.00531ff0
fld qword [0x566360]
fdivrp st(2)
mov ebx, eax
imul ebx, ebx, 0x64
faddp st(1)
mov dword [esi + 0x32c], ebx
call fcn.00531ff0
push ebx
push str.PC3__d
mov dword [esi + 0x334], eax
lea eax, [esi + 0x3c]
push 0x20
push eax
call fcn.00415470
add esp, 0x10
test byte [edi + 0xe], 1
push 0xc
pop ebx
je 0x40f7d7
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
and dword [ebp - 4], 0
test eax, eax
je 0x40f7bc
mov ecx, eax
call fcn.004047aa
jmp 0x40f7be
xor eax, eax
fld dword [0x566098]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0xe], 2
je 0x40f816
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x40f7fb
mov ecx, eax
call fcn.004047aa
jmp 0x40f7fd
xor eax, eax
fld dword [0x566094]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0xe], 4
je 0x40f855
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x40f83a
mov ecx, eax
call fcn.004047aa
jmp 0x40f83c
xor eax, eax
fld dword [0x566090]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0xe], 8
je 0x40f894
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x40f879
mov ecx, eax
call fcn.004047aa
jmp 0x40f87b
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 + 0xe], 0x10
je 0x40f8d3
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 4
test eax, eax
je 0x40f8b8
mov ecx, eax
call fcn.004047aa
jmp 0x40f8ba
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 + 0xe], 0x20
je 0x40f912
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 5
test eax, eax
je 0x40f8f7
mov ecx, eax
call fcn.004047aa
jmp 0x40f8f9
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 + 0xe], 0x40
je 0x40f951
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 6
test eax, eax
je 0x40f936
mov ecx, eax
call fcn.004047aa
jmp 0x40f938
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 + 0xe], 0x80
je 0x40f990
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 7
test eax, eax
je 0x40f975
mov ecx, eax
call fcn.004047aa
jmp 0x40f977
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 + 0xf], 1
je 0x40f9cf
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 8
test eax, eax
je 0x40f9b4
mov ecx, eax
call fcn.004047aa
jmp 0x40f9b6
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 + 0xf], 2
je 0x40fa0e
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 9
test eax, eax
je 0x40f9f3
mov ecx, eax
call fcn.004047aa
jmp 0x40f9f5
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 + 0xf], 4
je 0x40fa4d
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0xa
test eax, eax
je 0x40fa32
mov ecx, eax
call fcn.004047aa
jmp 0x40fa34
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
test byte [edi + 0xf], 8
je 0x40fa8c
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0xb
test eax, eax
je 0x40fa71
mov ecx, eax
call fcn.004047aa
jmp 0x40fa73
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 + 0xf], 0x10
je 0x40fac7
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], ebx
test eax, eax
je 0x40faac
mov ecx, eax
call fcn.004047aa
jmp 0x40faae
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 + 0xf], 0x20
je 0x40fb06
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0xd
test eax, eax
je 0x40faeb
mov ecx, eax
call fcn.004047aa
jmp 0x40faed
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 + 0xf], 0x40
je 0x40fb45
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0xe
test eax, eax
je 0x40fb2a
mov ecx, eax
call fcn.004047aa
jmp 0x40fb2c
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
movzx eax, byte [edi + 0x10]
mov ecx, dword [esi + 0x330]
mov dword [ebp - 0x10], eax
fild dword [ebp - 0x10]
fmul dword [ebp - 0x14]
fstp dword [ebp - 0x18]
cmp ecx, 0x190
je 0x40fbd5
cmp ecx, 0x215
je 0x40fbbf
cmp ecx, 0x29b
je 0x40fb9d
cmp ecx, 0x320
jne 0x40fbf9
cmp eax, 0x50
je 0x40fbce
cmp eax, 0x5a
je 0x40fb96
cmp eax, 0x64
je 0x40fbb1
cmp eax, 0x6e
jne 0x40fbf9
push 0x5660b0
jmp 0x40fbeb
push 0x5660ac
jmp 0x40fbeb
cmp eax, 0x54
je 0x40fbb8
cmp eax, 0x60
je 0x40fbce
cmp eax, 0x6c
je 0x40fb96
cmp eax, 0x78
jne 0x40fbf9
push 0x5660a8
jmp 0x40fbeb
push 0x5660a4
jmp 0x40fbeb
cmp eax, 0x5a
je 0x40fbdf
cmp eax, 0x69
je 0x40fbb8
cmp eax, 0x78
jne 0x40fbf9
push 0x5660a0
jmp 0x40fbeb
cmp eax, 0x64
je 0x40fbe6
cmp eax, 0x78
jne 0x40fbf9
push str.EGFJHK
jmp 0x40fbeb
push 0x5647f4
lea eax, [esi + 0x3c]
push 0x20
push eax
call fcn.00415550
add esp, 0xc
mov eax, dword [esi + 0x338]
and dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], eax
call fcn.00404ce9
jmp 0x40fc54
fldz
fcomp dword [ecx + 4]
fnstsw ax
test ah, 5
jp 0x40fc4c
fld dword [ebp - 0x18]
fdiv dword [ecx + 4]
fstp dword [ebp - 0x10]
fld dword [ebp - 0x10]
fdivr qword [0x564990]
fstp dword [ebp - 0x10]
fld dword [ebp - 0x10]
fstp dword [ecx + 8]
fld dword [ebp - 0x10]
fld dword [ebp + 8]
fcompp
fnstsw ax
test ah, 5
jp 0x40fc4c
fld dword [ebp + 8]
fstp dword [ecx + 8]
lea ecx, [ebp - 0x20]
call fcn.005105ae
mov ecx, eax
test ecx, ecx
jne 0x40fc10
movzx eax, byte [edi + 0x12]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fld dword [ebp - 0x14]
fld st(0)
fmulp st(2)
fxch st(1)
fstp dword [esi + 0x33c]
movzx eax, byte [edi + 0x13]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fld st(1)
fmulp st(1)
fstp dword [esi + 0x340]
movzx eax, byte [edi + 0x14]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fld st(1)
fmulp st(1)
fstp dword [esi + 0x344]
movzx eax, byte [edi + 0x15]
movzx ecx, byte [edi + 0x16]
and eax, 0xf
shl eax, 8
add eax, ecx
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fld st(1)
fmulp st(1)
fstp dword [esi + 0x348]
movzx eax, byte [edi + 0x15]
movzx ecx, byte [edi + 0x17]
shr eax, 4
shl eax, 8
add eax, ecx
mov dword [ebp + 8], eax
fimul dword [ebp + 8]
fstp dword [esi + 0x34c]
movzx eax, byte [edi + 0x3c]
and eax, 0x1f
mov dword [esi + 0x30c], eax
movzx ebx, byte [edi + 0x75]
and ebx, 0x7f
cmp ebx, 0xf
jle 0x40fcf3
push 0xf
pop ebx
xor eax, eax
test ebx, ebx
jle 0x40fd0a
push ebx
lea eax, [esi + 0x5c]
push 0x7f
push eax
call fcn.00530830
add esp, 0xc
mov eax, ebx
mov cl, byte [edi + 0x76]
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 + 0x78]
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 + 0x79]
mov al, cl
shr al, 4
imul dl
and cl, 0xf
add al, cl
mov byte [esi + 0x365], al
movzx eax, byte [edi + 0x7a]
movzx ecx, byte [edi + 0x7b]
shl eax, 8
add eax, ecx
movzx ecx, byte [edi + 0x7c]
shl eax, 8
add eax, ecx
movzx ecx, byte [edi + 0x7d]
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 + 0x80]
mov dword [ebp + 8], 0x12
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 0x40fd9c
mov byte [esi + 0x2ae], 0
movzx ebx, byte [edi + 0x94]
and ebx, 0x7f
cmp ebx, 0xf
jle 0x40fdca
push 0xf
pop ebx
xor eax, eax
test ebx, ebx
jle 0x40fde1
push ebx
lea eax, [esi + 0x7c]
push 0x7f
push eax
call fcn.00530830
add esp, 0xc
mov eax, ebx
mov cl, byte [edi + 0x95]
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